Is this for
VB, VBScript or for ASP?
In ASP, there is no "AS" keyword, so when you Dim something, you Dim just the variable name, no "AS Connection", etc
Second, I don't think "Option Compare Database" are ASP keywords, nor is "Private", or "New". If you're creating a new ADO object, use "Server.CreateObject()":
Set con = Server.CreateObject("ADODB.Connection")
You have a line:
Set con = New Connection
Then another line:
Set con = CurrentProject.Connection
I'm not sure why you're doing this, but "CurrentProject" is not an ASP object... drop that whole line
Then you have a bunch of objects with ".Visible" and ".Enabled" properties... these are also invalid in ASP