G
Guest
Hi everyone, i'm a newbie to VB.NET programming and i need help here. I'm
current doing an application for pocket pc and i get this sqlexception error
when i try to retrieve stuff from the database. My guess is that the error
lies with the connection string. I've tried serveral different connection
string but i still get the error.
Try
cn = New System.Data.SqlClient.SqlConnection("DATA
SOURCE=L311C007; Initial Catalog=HEALTHCARE; Integrated Security=SSPI;")
cn.Open()
cmd.CommandText = "SELECT * FROM PERSON"
cmd.Connection = cn
Catch ex As System.Data.SqlClient.SqlException
result = "There was an SqlException.." & vbCrLf &
"Details..." & vbCrLf & ex.ToString()
MsgBox(result)
End Try
The connection strings that i have tried are:
User id=sa;password=;database=HEALTHCARE;server=L311C007
Data Source=L311C007,14433;Initial Catalog=HealthCare;User id=sa;password=;
current doing an application for pocket pc and i get this sqlexception error
when i try to retrieve stuff from the database. My guess is that the error
lies with the connection string. I've tried serveral different connection
string but i still get the error.
Try
cn = New System.Data.SqlClient.SqlConnection("DATA
SOURCE=L311C007; Initial Catalog=HEALTHCARE; Integrated Security=SSPI;")
cn.Open()
cmd.CommandText = "SELECT * FROM PERSON"
cmd.Connection = cn
Catch ex As System.Data.SqlClient.SqlException
result = "There was an SqlException.." & vbCrLf &
"Details..." & vbCrLf & ex.ToString()
MsgBox(result)
End Try
The connection strings that i have tried are:
User id=sa;password=;database=HEALTHCARE;server=L311C007
Data Source=L311C007,14433;Initial Catalog=HealthCare;User id=sa;password=;