Connection must be valid and open
Have a Connection called localConnection
Have this in my VB.Net code:
If localConnection.State <> ConnectionState.Open Then
localConnection.Open()
End If
With cmdSelect
.Connection = localConnection
.CommandText = strSql
Return .ExecuteScalar
End With
When attempting to run ExecuteScalar, intermittently I get the above error. The connection is valid at this point. How can I get this error, when if connection not open, opens the connection. ConnectionTimeout is 15 is this causing my problem?
Also intermittently I get the "no query in DataReader" error when using DataAdapter and DataTable. Believe there is a connection between these two errors but unsure what this can be.
I am using .NET Connector 1.0.7
Stuart
Edited 2 time(s). Last edit at 11/24/2006 04:32AM by Stuart Brant.
Subject
Written By
Posted
Connection must be valid and open
November 24, 2006 04:10AM
Sorry, you can't reply to this topic. It has been closed.
Content reproduced on this site is the property of the respective copyright holders.
It is not reviewed in advance by Oracle and does not necessarily represent the opinion
of Oracle or any other party.