J
Johnson
I have spent 3 plus hours looking at documentation and references. I
have copied code and changed variables... but still nothing. Here is
my connection string and scalar.
Dim sqlConn As New SqlConnection("Data Source=*Server;Initial
Catalog=*DBName;Integrated Security=SSPI;")
Dim sqlComm As New SqlCommand(strSQL, sqlConn)
sqlConn.Open()
Dim strUserID As Integer = sqlComm.ExecuteScalar()
sqlConn.Close()
MsgBox(strUserID)
The SQL statement is correct and runs perfectly in the query analyzer.
It returns a 1 in SQL Server which is the correct result. However it
returns a 0 whenever I try to access this data in my .NET windows app.
Am I forgetting anything?
-Lost on what to do next
have copied code and changed variables... but still nothing. Here is
my connection string and scalar.
Dim sqlConn As New SqlConnection("Data Source=*Server;Initial
Catalog=*DBName;Integrated Security=SSPI;")
Dim sqlComm As New SqlCommand(strSQL, sqlConn)
sqlConn.Open()
Dim strUserID As Integer = sqlComm.ExecuteScalar()
sqlConn.Close()
MsgBox(strUserID)
The SQL statement is correct and runs perfectly in the query analyzer.
It returns a 1 in SQL Server which is the correct result. However it
returns a 0 whenever I try to access this data in my .NET windows app.
Am I forgetting anything?
-Lost on what to do next