New Why would a VB/ASPX page not return results for a query which runs fine with other Oracle clients? (Same username)
Old
The following code should first output the query and then execute it outputting a single exclamation point per record. However, it outputs the query (as it should), but does not return any rows (nor error). If I copy the query to SQL Plus (or other editor) as the same user, the query returns results.
Why might my code not output any results?
Dim MyQuery As String = "...some query..."
Dim Factory As DbProviderFactory = DbProviderFactories.GetFactory("System.Data.OracleClient")
Dim myConn As DbConnection = Factory.CreateConnection
Dim myCommand As DbCommand = Factory.CreateCommand
Dim MyReader As DbDataReader
myConn.ConnectionString = LimsQuery.ConnectionString
myConn.Open()
myCommand.Connection = myConn
myCommand.CommandText = MyQuery
myCommand.CommandType = CommandType.Text
Response.Write(myCommand.CommandText)
MyReader = myCommand.ExecuteReader()
ResultsGrid.Columns.Clear()
While MyReader.Read()
Response.Write("!")
End While