There is already an open DataReader associated with this Connection which must be closed first



  • 1. Data Provider couldn't be initialized
    Hi everybody, I have the next issue in Access I create a Project with a trusted connection with SQL server 2000 and wrote a module that is executed when the project is executed in order to get the string connection as follows dim con as ADODB. Connection set con = CurrentProject.Connection the problem is that in some machines run withuot problem but in other I have the following error: Data Provider Could not be Initialized Any idea what could be the problem?
  • 2. RollbackTrans methos still set Underlying Values
    Hello, When I rollback my transaction using ADO's Connection.RollbackTrans() method, the data is not saved to the databse (which is good) but the recordset has the current values in the Underlying Value property, instead of "Empty". (These are all inserts. I roll back the transaction if one of the attempted inserts already exists in the database.) Now that the underlying value fields are populated, I can't attempt to save the recordset after the user fixes teh offending rows. All unmodified rows are not sent to the SQL server. And modified rows give me an error that the data may have been changed since it was last read. This seems to indicate that ADO is attempting to issue an Update statement, rather than an Insert statement. Any help would be appreciated. Thanks, Scott p.s. I am using ADO 2.8 to connect to an SQL server databse.
  • 3. missing parameter but no parameters used ??
    Hi, i'm getting an error when I Execute a SQL string on my website. My website is ASP, and i'm using an Access 2003 Database. What's wrong? Can anyone help me please This is what i try: SQL = "Select * " _ & "from tblTable " _ & "order by intID desc" Set RS = Conn.Execute(SQL) I'm getting this error: Microsoft JET Database Engine error '80040e10' No value given for one or more required parameters
  • 4. running a make table query in an access database from VB
    Hi: I am a newbie VB programmer. I have an access database (MyDatabase.mdb), but cannot assume that Access.exe is available. Within this database there is a "make-table" query called "MakeTable1." The SQL for this table is simply "SELECT * INTO Table1 FROM Query1" where Query1 is an existing query in the db. What I would like to do is simply "execute" the MakeTable1 query (or alternatively, execute the SQL statement "SELECT * INTO Table1 from Query1") from VB. I don't need to put recordsets or anything like that -- just need to automate the make-table query and Table1 created (or recreated) on command from VB code. I'm sure this is really simple, but I am a little lost. Can someone help me with a code sample? Best, -- Earl Takasaki Master of Financial Engineering Candidate University of California at Berkeley
  • 5. Hiding DataGrid Rows
    Is there a way to hide a datagrid row or set it's width to zero for an exixting table in the Dataset. I need to filter the grid and and show only rows with selected column data.

There is already an open DataReader associated with this Connection which must be closed first

Postby Viswanathan S » Tue, 28 Jun 2005 20:17:15 GMT

Hi All,

I often get the same error when filling data adapter. There is already an
open DataReader associated with this Connection which must be closed first

myda.Fill(newds, "Employee")

But the same type fill command is working in other forms without error.

When filling data adapter it internally opens the executereader but it is
not closing.

How the OledbDataAdapter with fill works? When will it executes the reader.
Why there is a difference in filling with datasets?

Thanks in Advance

S. Viswanathan

Re: There is already an open DataReader associated with this Connection which must be closed first

Postby William (Bill)Vaughn » Wed, 29 Jun 2005 01:27:36 GMT

First, you'll get more interest in this ADO.NET question on the ADO.NET 
list. Use microsoft.public.dotnet.framework.adonet instead.
Next, we see this problem when using the DataReader in addition to Fill to 
populate a DataSet.  We can also see it if the Fill has not completed for 
some reason--as when it cannot populate rows as they are locked. You say 
you're using the OleDb classes. What database are you accessing? Are you 
trying to access the same database from more than one thread/form at a time?

William (Bill) Vaughn
Author, Mentor, Consultant
Microsoft MVP
Please reply only to the newsgroup so that others can benefit.
This posting is provided "AS IS" with no warranties, and confers no rights.

Return to ADO


Who is online

Users browsing this forum: No registered users and 54 guest