Vadim Rapp

  • Thread starter Thread starter T.J. Bernard
  • Start date Start date
T

T.J. Bernard

Vadim, You offered me alot of help in the past and
answered my previous question. I am still running into
this error in the database:

Run-time error '3709':
The connection cannot be used to perform this
operation. It is either closed or invalid in this
context.

I am getting this when I try to run a very simple
Recordset through code Recordset.open property. I have
opened another recordset in the database just fine and
received no errors, the code for this recordset is the
same and I get the error above. I am using
CurrentProject.Connection as my Connection String, so I am
not sure why I continue to get the error.

I have even simplified the recordset down to where it is
just "Select ID from tbl_Tape" and still I get the error.
What is strange is the code on another form in the same
ADP project works just fine when in creates a recordset.

If you have any ideas or anything I might try let me
know. I am banging my head against the wall on this one
and just need a fresh perspective.
 
TB> The connection cannot be used to perform this
TB> operation. It is either closed or invalid in this
TB> context.

must be something trivial, like a typo. Why don't you post that peace of code
here.

Vadim
 
TB> Set cnn1 = CurrentProject.Connection
TB> Set rs1 = New ADODB.Recordset

TB> rs1.Open "Select vw_SearchDate.Tape_Number from
TB> vw_SearchDate"


So, where do you think you say that rs1 should use cnn1?

Vadim
 
Vadim,

I am not sure, but thank you for your help. The following
code works just fine in every form but one, so I am going
to use a work around. Strange, may just be some glitch
with the ADP project, or maybe something happened to my
database.

Thank you again for your time.

T.J.
 
Back
Top