Ok first time poster here. I am very inexperienced with SQL and most all programs I am trying to use, lol. Taking on too much too soon I guess. Ok, I am having a problem in VB but I think it has to do something with a setting I have in SQL server. here it is. I am trying to make a connection to a databasae using this code in VB
It is giving me a data source not found and no default driver specified. I know for a fact that this is the correct name for the database. Another mock database i created works fine. So what could be the problem. Is there something in SQL Server that i need to tweak in order for VB to open this connection? Any help would be greatly appreciated and a round of beers would seem to be in order as well. thanks alot.
You haven't mentioned the Initial Catalog.OK first of all check these things.
1.Make sure that User and password are correct.
2.Check the server name.
Try this one ...
Provider=SQLOLEDB.1;Persist Security Info=true;User ID=sa;Password=password;Initial Catalog=Test
I hope this will solve your problem.
I am not 100% on this however I believe that MSDASQL.1 is now considered obsolete. I have certainly never used it. I have certainly seen things on the web re bugs and slow running using this provider. Have a look at http://www.connectionstrings.com/ and see if you can improve things.
Also - you would be strongly advised not to use the SA account for connecting to your server. Use either windows authentification (MS recommeded) or create a new SQL Server Login with only the permissions required of the user.
Thanks alot for the help. Sad thing was, I had visited connectionstrings.com and even saved it to my favorites last night but failed to even give it a shot. It got me one stone closer to where I need to go. Now it's off to some VB forums to solve other issues. I am sure I will return for more simple stuff in the near future. Again, thanks.