Database connetivity in vb.net with sql server2005
vb.net database with sql server
2 Answers
Know the answer? Post it. Somebody with the same question will find it here.
Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend5days leftRegister
sathish kumar115 reputationPosted Jan 2, 2013, 7:50 PM EST
string dbconn= configurationManager.connectionstrings["Db"].connectionstring
sqlconnection conn= new sqlconnection(dbconn)
conn.open()
sqlcommand cmd=new sqlcommand("Query",conn)
cmd.executeNonquery()
conn.close()
Hope u can understand now.....
Dorababu MekaRank #457 · 5.5K reputationPosted Jan 2, 2013, 10:18 PM EST
//remaining code of yours
if you are retrieving from app.config file then you can use as follows
Dim FilePath As String = ConfigurationManager.AppSettings("ConnectionString")