General Network Error accessing SQLserver via wired connection?

W

Wapiti

Is there anything special I need to do to get my emulator to access a
database on my sqlserver?

The server is on the same pc as the emulator (for testing). My connection
code is simple:

Try
Dim SQLconn As SqlClient.SqlConnection
Dim cnStr = "server=Wapiti;database=Northwind;uid=sa;pwd=password"

'SQLconn = New SqlClient.SqlConnection(cnStr)
SQLconn = New
SqlClient.SqlConnection("server=Wapiti;database=Northwind;uid=sa;pwd=password")
SQLconn.Open()
MsgBox("We connected!")
SQLconn.Close()

Catch sqlex As SqlException
MsgBox("FAILED!" & vbCr & vbCr & sqlex.Message)

Catch ex As Exception
'Your connection string is not woking here
MsgBox("We failed to connect!" & vbCr & vbCr & ex.Message)
End Try
 
W

Wapiti

Well, figured this one out on my own ---- I had SQLserver authentication
set to Windows only.... Not windows and sqlserver, so the sa account I was
using to test wouldn't, well, authenticate.

Hope this helps someone -
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top