|
-
Jan 2nd, 2011, 02:41 PM
#1
Thread Starter
Lively Member
[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
-
Jan 2nd, 2011, 07:58 PM
#2
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
Last edited by LaVolpe; Jan 2nd, 2011 at 08:24 PM.
-
Jan 2nd, 2011, 09:48 PM
#3
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
-
Jan 3rd, 2011, 01:33 AM
#4
Thread Starter
Lively Member
Re: SQL Help
Ok!! Al try that techgnome..... I used different strings from that link LaVolpe...
-
Jan 3rd, 2011, 03:20 AM
#5
Thread Starter
Lively Member
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
-
Jan 3rd, 2011, 03:51 AM
#6
Thread Starter
Lively Member
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
-
Jan 3rd, 2011, 08:31 AM
#7
Re: [RESOLVED] SQL Help
Ah... ok, so your SQL Server is using Windows Authentication instead of SQL Authentication...that would do it then.
-tg
-
Jan 3rd, 2011, 10:20 AM
#8
Thread Starter
Lively Member
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
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|