Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Database Problems

Status
Not open for further replies.

jay2502

Technical User
Apr 20, 2007
25
A2
When I try to add a database to my project I get a msg saying no user instence how do I fix This
 
Can you write the code to connect to the database manually?

For example:
Code:
Imports System.Data.SqlClient

'Normal form code

  Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
    Dim con As New SqlConnection([i]ConnectionString[/i])

    con.Open
    con.Close
  End Sub

If you need help writing the ConnectionString, then have a look at
You may need to add ";User Instance=true" (or false) to the end of the connection string, which could be your problem with the wizard for connecting to the database not adding this to the connection string.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top