Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

SQL 2000 Connection

Status
Not open for further replies.

NickCorlett

Technical User
May 23, 2002
71
0
0
GB
I am attempting to obtain a database connection to a SQL 2000 database. The code I have works fine for a SQL 6.5 database but returns an error saying I can't login. Can anybody help???

This is the code which works on a SQL6.5 database but not on a 2000 one.

"Set DBObj= Server.CreateObject("ADODB.Connection")
dBObj.Open "Provider=SQLOLEDB.1;Integrated Security=SSPI;Persist Security Info=False;Initial Catalog=NickDev;Data Source=NTSERVER11;Locale Identifier=2057;Connect Timeout=15;Use Procedure for Prepare=1;Auto Translate=True;Packet Size=4096;Workstation ID=NIL251;
dbObj.CommandTimeout = 0"
 
Nick,

The problem will be caused by the differeing security regimes used on the two databases. You could try putting an ADO data control onto a form and use that to build a connection string which can be cut and pasted into your code.

Andy.
 
If your not passing a login and password try adding this.

[tt]
Trusted Connection=yes;
[/tt] Craig, mailto:sander@cogeco.ca

Remember not to name the Lambs...
It only makes the chops harder to swallow
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top