1,105,281 Community Members

vb.net with microsoft sql server

Member Avatar
frenchastro
Newbie Poster
1 post since Sep 2013
Reputation Points: 0 [?]
Q&As Helped to Solve: 0 [?]
Skill Endorsements: 0 [?]
 
0
 

how to connect a vb.net form to microsoft sql server database in coding?

Member Avatar
Klahr_R
Junior Poster
114 posts since Apr 2009
Reputation Points: 0 [?]
Q&As Helped to Solve: 12 [?]
Skill Endorsements: 5 [?]
 
0
 

Please post in .NET forum

Member Avatar
Reverend Jim
Noli mentula
5,393 posts since Aug 2010
Reputation Points: 744 [?]
Q&As Helped to Solve: 643 [?]
Skill Endorsements: 51 [?]
Moderator
Featured
 
0
 

If you are connecting to a SQL server instance on your own (trusted) computer you can use

Dim con As New SqlConnection("Server=.\SQLEXPRESS;Database=PUBS;Trusted_Connection=yes;")

If you have installed SQLEXPRESS then the above connection string is sufficient. Just replace PUBS with the appropriate database name. If you need other strings you can find them here

You
This article has been dead for over three months: Start a new discussion instead
Post:
Start New Discussion
Tags Related to this Article