Click to See Complete Forum and Search --> : Why can't I connect to sql server 2000 ?


Robert Chu
01-02-2006, 05:13 PM
Hello,
I use the following code to connect to sql server 2000. There will be errors like this: 'Let' and 'Set' assignment statements are no longer supported. How can I fix it ?

Set ConnSt03=Server.CreateObject("ADODB.connection")
STRCON="PROVIDER=SQLOLEDB.1;DATA SOURCE=localhost;USER ID=KKK;PASSWORD=KKK;INITIAL CATALOG=test"

takkie
01-20-2006, 03:04 PM
take away the SET word before ConnSt03.

just make it liek this,

ConnSt03=Server.CreateObject("ADODB.connection")
STRCON="PROVIDER=SQLOLEDB.1;DATA SOURCE=localhost;USER ID=KKK;PASSWORD=KKK;INITIAL CATALOG=test"

Its not the connection to db, its your syntax of that line.

tak

juicemousezero
01-20-2006, 06:58 PM
There's just gotta be a better choice for your user id and password... *shrug*