-
[RESOLVED] SQL Help
Hello Guys, I am trying to change my software from using an access database to a ms sql server dbase. I have already installed. I used a module to handle connection to the database. and when i try run the vb app all am getting is this error
[DBNETLIB][ConnectionOpen (Connect()).]SQL Server does not exist or access denied
My connection string is as thus..
conn.ConnectionString = "Provider = sqloledb;" & _
"Data Source={DABUSHAR};" & _
"Initial Catalog={sdp};" & _
"User ID={Pertoh};" & _
"Password={};"
conn.Open
Please Help
-
Re: SQL Help
Probably would have been better to post this in the Database portion of the forum. I'm not familiar with MySQL, but the use of those brackets sure doesn't look correct.
Maybe spend some time in the forum's DB FAQ section
Here's a list of MySQL connection statements
Edited: Blew that one. Not sure where I got MySQL from... but here are sample connection strings for most databases
-
Re: SQL Help
LaVolpe - not sure what mySQL has to do with anything, except maybe your eyes getting tired... but that's beside the point.
Patoh - I'd say that your connection string is wrong. Specifically removing all the { and }
-tg
-
Re: SQL Help
Ok!! Al try that techgnome..... I used different strings from that link LaVolpe...
-
Re: SQL Help
i tried this and am still getting an invalid string connection
conn.ConnectionString = "Provider=SQLNCLI;Server=DABUSHAR;Database=sdp;Uid=Pertoh; Pwd=;"
conn.Open
-
Re: SQL Help
I got it.. i used another connection string and it worked. I used:
conn.ConnectionString = "Provider=SQLOLEDB.1;Integrated Security=SSPI;Persist Security Info=False;Initial Catalog=sdp;Data Source=."
Thanx Guyz
-
Re: [RESOLVED] SQL Help
Ah... ok, so your SQL Server is using Windows Authentication instead of SQL Authentication...that would do it then.
-tg
-
Re: [RESOLVED] SQL Help
Yeah.. Switched sql server to windows authentication then used the string that supports win auth... iT works on all the programs