F
fniles
I am using VB.Net 2003 and MS Access (connecting using OleDBConnection).
I read using DataAdapter and DataSet, not DataReader.
When many people try to access the database at the same time, I get the
error "ExecuteReader requires an open and available Connection. The
connection's current state is Open, Executing." I do not use ExecuteReader,
why the error says ExecuteReader. What does it mean ?
When I get this error, is there a way for me to loop and wait until there is
an open and available Connection ?
Thank you.
Dim cmd As New OleDb.OleDbCommand
Dim da As OleDb.OleDbDataAdapter
Dim ds As DataSet
With cmd
.Connection = ConnectionDemoOLE
.CommandText = sql
Try
da = New OleDb.OleDbDataAdapter
ds = New DataSet
da.SelectCommand = cmd
da.Fill(ds)
Catch ex As Exception
msgbox ex.message '-> error "ExecuteReader requires an open and
available Connection. The connection's current state is Open, Executing."
end try
I read using DataAdapter and DataSet, not DataReader.
When many people try to access the database at the same time, I get the
error "ExecuteReader requires an open and available Connection. The
connection's current state is Open, Executing." I do not use ExecuteReader,
why the error says ExecuteReader. What does it mean ?
When I get this error, is there a way for me to loop and wait until there is
an open and available Connection ?
Thank you.
Dim cmd As New OleDb.OleDbCommand
Dim da As OleDb.OleDbDataAdapter
Dim ds As DataSet
With cmd
.Connection = ConnectionDemoOLE
.CommandText = sql
Try
da = New OleDb.OleDbDataAdapter
ds = New DataSet
da.SelectCommand = cmd
da.Fill(ds)
Catch ex As Exception
msgbox ex.message '-> error "ExecuteReader requires an open and
available Connection. The connection's current state is Open, Executing."
end try