By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
429,423 Members | 1,601 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 429,423 IT Pros & Developers. It's quick & easy.

how to connect data base in

P: 17
hi every

am trying to connect data base in but am unable to connect. As per the book am following that says to connect to data base go to tools menu connect to data base option. u will get data link property . But am not getting that . Am getting add connection from which i can able to select the data base like oracle or sql but not able to move further. When i click test button. your test connection is fail. am not able to get data adapter in the tool bod only then i can connect to data base. plz help in connecting data base.
Apr 12 '07 #1
Share this Question
Share on Google+
3 Replies

Expert 5K+
P: 7,872
Be sure to get the address or location of the sql database correctly
Sometimes MSSQL won't be sitting at "localhost" it will be "localhost/someotherword".
Apr 12 '07 #2

P: 13
dont oflow wizard method.

try coding .it is worthwhile. ofllow any standard books on .NET or
MSDN help .
Apr 14 '07 #3

P: 30
what data base you are using? is it sql server or oledb or ms access? try this line of code in connecting your database.


dim con as new sqlconnection(Server="localhost"; Database="your dbase" User ID="sa"; pwd=")


dim con as new OLEDB.OLEDBCONNECTION("Provider=Microsoft.Jet.OLED B.4.0; Data Source="your dbase.mdb")
NOTE: make sure your database is in the bin folder of your program.

if there is a problem post it asap.
Apr 18 '07 #4

Post your reply

Sign in to post your reply or Sign up for a free account.