Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
bobbabuoy
Starting Member
33 Posts |
Posted - 2003-11-29 : 06:13:09
|
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.Connectionconn.ConnectionString = "Provider=SQLOLEDB.1;Integrated Security=SSPI;Persist Security Info=False;Initial Catalog=MyDb;UID=sa;Pwd=somepassword;Data Source=MyServer" conn.OpenI 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?Thanks! |
|
Merkin
Funky Drop Bear Fearing SQL Dude!
4970 Posts |
Posted - 2003-11-29 : 06:36:55
|
HiTake 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.Damian |
|
|
|
|
|