S
Steve Schroeder
From MSDN:
http://msdn.microsoft.com/library/d...stemDataIDbCommandClassExecuteScalarTopic.asp
Use the ExecuteScalar method to retrieve a single value (for example, an
aggregate value) from a database.
Public Sub CreateMySqlCommand(myScalarQuery As String, myConnection As
SqlConnection)
Dim myCommand As New SqlCommand(myScalarQuery, myConnection)
myCommand.Connection.Open()
myCommand.ExecuteScalar()
myConnection.Close()
End Sub 'CreateMySqlCommand
....
Thanks Billy...ExecuteScalar is used to retrieve a single value, and then
your example doesn't even reflect retrieving a value...hello! Anyone home?
Ok, sarcasm aside, could someone expound on this flawed example that shows
how a value returned from a stored procedure could be assigned to a variable
expression?
Thank you!
http://msdn.microsoft.com/library/d...stemDataIDbCommandClassExecuteScalarTopic.asp
Use the ExecuteScalar method to retrieve a single value (for example, an
aggregate value) from a database.
Public Sub CreateMySqlCommand(myScalarQuery As String, myConnection As
SqlConnection)
Dim myCommand As New SqlCommand(myScalarQuery, myConnection)
myCommand.Connection.Open()
myCommand.ExecuteScalar()
myConnection.Close()
End Sub 'CreateMySqlCommand
....
Thanks Billy...ExecuteScalar is used to retrieve a single value, and then
your example doesn't even reflect retrieving a value...hello! Anyone home?
Ok, sarcasm aside, could someone expound on this flawed example that shows
how a value returned from a stored procedure could be assigned to a variable
expression?
Thank you!