Click to See Complete Forum and Search --> : global.asa connection string and 800a0400 error


Spukee
02-15-2004, 09:05 PM
Alright, I'll give up a little background since I'm a newbie and all. I'm a designer - programming just isn't my forte, and as such, I'm not too incredible at diving into a new script and coming out unscathed. So this project gets dropped in my lap, a web site being moved to a new server. No sweat - until I encounter the dreaded 500.100 internal server error. I go in only to discover a whole new world.

To make a long story short, I went into netscape to debug and came up with this:

Microsoft VBScript compilation error '800a0400'

Expected statement

/LM/W3SVC/282/Root/global.asa, line 26

<% Set cnn = Server.CreateObject("ADODB.Connection") cnn.open "PROVIDER=SQLOLEDB;DATA SOURCE=mssql.golfwinenewzealand.com;UID=lalogg;PWD=blaloggia!;DATABASE=lalogg " %>
^

I understand it's a connection string problem - I believe the host is running MS SQL 2003, and I know it's DSN-less. According to them this is the right connection string, but my variables may be off. To give the whole big picture, here's the rest of the code:

<SCRIPT LANGUAGE=VBScript RUNAT=Server>
Sub Application_OnStart

End Sub
</SCRIPT>

<SCRIPT LANGUAGE=VBScript RUNAT=Server>
Sub Application_OnEnd

End Sub
</SCRIPT>

<SCRIPT LANGUAGE=VBScript RUNAT=Server>
Sub Session_OnStart
'Language Settings



'Session LOCALE information for NZ (for date/number formats)
Session.LCID = 5129 'NZ
Session.CodePage = 850

'Session Timeout
Session.Timeout = 20

<% Set cnn = Server.CreateObject("ADODB.Connection") cnn.open "PROVIDER=SQLOLEDB;DATA SOURCE=mssql.golfwinenewzealand.com;UID=lalogg;PWD=blaloggia!;DATABASE=lalogg " %>





End Sub
</SCRIPT>

Well, any help or insight would be appreciated. I'll check back as often as I can, and thanks in advance!

buntine
02-15-2004, 09:12 PM
This is odd... Your asa file seems to be in good shape.

You do not need to use the <% and %> characters within your gloabal.asa file. Try removing them and see what happens.

They may well have a problem with file permissions on the server.

Regards,
Andrew Buntine.

Spukee
02-15-2004, 11:02 PM
wow, well that changed everything - I appreciate the help! I'm still having errors though:

Microsoft OLE DB Provider for SQL Server error '80004005'

[DBNETLIB][ConnectionOpen (ParseConnectParams()).]Invalid connection.

/LM/W3SVC/282/Root/global.asa, line 27

I'm using a MS SQL DSN-less connection string for an OLE DB connection - I changed it slightly from the previous post so:

<SCRIPT LANGUAGE=VBScript RUNAT=Server>
Sub Application_OnStart

End Sub
</SCRIPT>

<SCRIPT LANGUAGE=VBScript RUNAT=Server>
Sub Application_OnEnd

End Sub
</SCRIPT>

<SCRIPT LANGUAGE=VBScript RUNAT=Server>
Sub Session_OnStart
'Language Settings



'Session LOCALE information for NZ (for date/number formats)
Session.LCID = 5129 'NZ
Session.CodePage = 850

'Session Timeout
Session.Timeout = 20

Set cnn = Server.CreateObject("ADODB.Connection")
cnn.open "PROVIDER=SQLOLEDB;DATA SOURCE=http://www.golfwinenewzealand.com;UID=lalogg;PWD=blaloggia!;DATABASE=lalogg"







End Sub
</SCRIPT>

Atleast there's some progress being made. Thanks again!

buntine
02-16-2004, 12:13 AM
Try changing DATA SOURCE to SERVER.. Like this:


cnn.Open "DRIVER={SQL Server};SERVER=mssql.golfwinenewzealand.com;UID=lalogg;PWD=blaloggia!;DATABASE=lalogg"

Spukee
02-16-2004, 02:49 PM
That did change things - afterwards I discovered there was a syntax error in the GenericFunctions.asa file. Well, I'm getting closer - so thanks again, I really appreciate it