Hello
I have a method that returns a datareader as this:
Can i feed it with a SQL string as this?
When i execute this, only "a" is returned. Is it possible to execute multiple queries? (in asp.net 1.1)
I have a method that returns a datareader as this:
Code:
Protected Function SelectReader(ByVal SQL As String) As SqlDataReader
objCmd.CommandText = SQL
Dim rdr As SqlDataReader
Try
OpenConnection()
rdr = objCmd.ExecuteReader(CommandBehavior.CloseConnection)
Catch exSQL As SqlException
errorMsg = exSQL.Message
NotifyAdmin("SelectReader", SQL, errorMsg)
Catch ex As Exception
errorMsg = ex.Message
Throw ex
Finally
objCmd.Dispose()
End Try
Return rdr
End Function
Can i feed it with a SQL string as this?
Code:
"Select a from b;select c from d;"
When i execute this, only "a" is returned. Is it possible to execute multiple queries? (in asp.net 1.1)