0
This is the solution for ur problem
InitialCatalog=Testdb;DataSource=.\\sqlexpress;Pooling=True;User ID=sa;Password=sa
0
now im using this connection string...
Data Source=.\\sqlexpress;Initial Catalog=mydb;Integrated Security=true
the problem now is that it cannot open the database requested by the login. it's saying that login failed. it appears on my conn.Open();
0
Jut do the following on the load form event
Dim conTransit As SqlConnection
conTransit = New SqlConnection("Server=SERVER;Database=DATABSE;Integrated Security=SSPI")
'YOU COULD USE --- [User ID=USER;Password=PASSWORD] INSTEAD OF [Integrated Security=SSPI]if your sqlserver does
'not have windows default access
Try
'Try the SQL-SERVER connection
conTransit.Open()
'Additonal check statements
If conTransit.State = ConnectionState.Open Then
MessageBox.Show("Connection OK" & "" & conTransit.ConnectionString)
Else
MessageBox.Show("Could not open SQL database Connection : " & "" & conTransit.ConnectionString)
End If
' -----------------------Genrate error meaasge-------------------------------------
Catch er As System.Data.SqlClient.SqlException
MsgBox("You have Problem generating SQL Server Connection" & "--->" & er.Message, MsgBoxStyle.Critical, "MY SYSTEM ERROR!")
End Try
Enjoy................
0
Hello,
Do as follows
Under sql server 2005 go into configuration and select SQL Server surface and configuration.
Click the link for Surface Area Configuration for Services and Connections
next for standard SQL conections expand Database Engine, then click Remote Connections.
There you will select local and remote connections and also select Using both TCP/IB and named pipes.
If you use SQLExpress expand and use the above sitings here also.
any questions
http://www.terranettech.net