Please start any new threads on our new site at We've got lots of great SQL Server experts to answer whatever question you can come up with.

Our new SQL Server Forums are live! Come on over! We've restricted the ability to create new threads on these forums.

SQL Server Forums
Profile | Active Topics | Members | Search | Forum FAQ
Save Password
Forgot your Password?

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 SQL Server, ADO, VB Connection
 Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

Starting Member

33 Posts

Posted - 11/29/2003 :  06:13:09  Show Profile  Visit bobbabuoy's Homepage  Reply with Quote
I am running a vb app that accesses a sql server db on my machine. I also access the same db from some web apps using a dsn connection and it works just fine. However, I am having trouble connecting with the db in my vb app. I could do it using an adodc object but I need to do it in code.

The code I was using (and was working) hasn't changed but we moved our physical office and now it no longer works. I get an SSPI error. Here is the code:

Set conn = New ADODB.Connection

conn.ConnectionString = "Provider=SQLOLEDB.1;Integrated Security=SSPI;Persist Security Info=False;Initial Catalog=MyDb;UID=sa;Pwd=somepassword;Data Source=MyServer"


I have no idea what the problem might be. My sql server is set up in mixed mode so it should let me in with my Windows login OR with the username and password that I have in there. Any ideas where the problem might be?


Funky Drop Bear Fearing SQL Dude!

4970 Posts

Posted - 11/29/2003 :  06:36:55  Show Profile  Visit Merkin's Homepage  Reply with Quote

Take out the Integrated Security=SSPI; part if you want to use SQL authentication, you don't need it.

Also, it's not good form to use SA to connect to your database.

Go to Top of Page
  Previous Topic Topic Next Topic  
 Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.02 seconds. Powered By: Snitz Forums 2000