recordsets (type "table"): error 3008

recordsets (type "table"): error 3008

Post by Reinhard Brandst?tte » Fri, 19 Nov 1999 04:00:00



Hi!

Actually I'm facing a problem with recordset-objects. In more details:
Within a Workspace.BeginTrans - Workspace.CommitTrans section I want to
delete some records in a recordset of type table (named recTable1). Before I
do so I check another four recordset-objects (also of type table; named
recTable2 to recTable5) in order to ensure that my records to be deleted are
not existing in these four tables as foreign keys. This proof is also be
done within the Workspace transaction. If proof is positive (so that records
have not occured as foreign keys in any of the four tables), I always get an
error when I try to delete the records in recTable1 on grounds of err.number
3008. The mysterious thing is that according to error description delete
action has been denied because recTable4 is already opened exclusively by
another user or because it has been opened from desktop. Definitively both
reasons are not true. So I tried to close one or two of the four tables
before I delete the records in recTable1. Then the thing run properly. (What
drives me crazy as well is that it depends on which tables I close whether I
have to close one or two of them in order that error 3008 does not occur
anymore.) Of course I do not want to implement it in this "unserious" way. I
would like to close all of the recordset-objects after delete action not
partly before.

All tables are part of an Access97 database. Database itself has been opened
in multi user mode. Visual Basic version is 5.0 with Service Pack 3.

No idea anymore!

Thanx in advance for any suggestions.

Yours, Reinhard Brandstoetter

 
 
 

recordsets (type "table"): error 3008

Post by Coat » Fri, 19 Nov 1999 04:00:00


My only advise, is that is better to open and close all your recordset
objects outside your transaction.
I don't know how are you coding this section, but for my experience is
better to:

'open all recordsets
set ds=db.openrecordset

wk.BeginTrans
'database code ...

wk.CommitTrans
ds.close
'close all the recordsets ...

HTH
--
Alberto Borbolla
Microsoft VB MVP
Tecnologia en Sistemas Mexico


> Hi!

> Actually I'm facing a problem with recordset-objects. In more details:
> Within a Workspace.BeginTrans - Workspace.CommitTrans section I want to
> delete some records in a recordset of type table (named recTable1). Before
I
> do so I check another four recordset-objects (also of type table; named
> recTable2 to recTable5) in order to ensure that my records to be deleted
are
> not existing in these four tables as foreign keys. This proof is also be
> done within the Workspace transaction. If proof is positive (so that
records
> have not occured as foreign keys in any of the four tables), I always get
an
> error when I try to delete the records in recTable1 on grounds of
err.number
> 3008. The mysterious thing is that according to error description delete
> action has been denied because recTable4 is already opened exclusively by
> another user or because it has been opened from desktop. Definitively both
> reasons are not true. So I tried to close one or two of the four tables
> before I delete the records in recTable1. Then the thing run properly.
(What
> drives me crazy as well is that it depends on which tables I close whether
I
> have to close one or two of them in order that error 3008 does not occur
> anymore.) Of course I do not want to implement it in this "unserious" way.
I
> would like to close all of the recordset-objects after delete action not
> partly before.

> All tables are part of an Access97 database. Database itself has been
opened
> in multi user mode. Visual Basic version is 5.0 with Service Pack 3.

> No idea anymore!

> Thanx in advance for any suggestions.

> Yours, Reinhard Brandstoetter


 
 
 

1. recordsets (type "table"): error 3008

Hi!

Actually I'm facing a problem with recordset-objects. In more details:
Within a Workspace.BeginTrans - Workspace.CommitTrans section I want to
delete some records in a recordset of type table (named recTable1). Before I
do so I check another four recordset-objects (also of type table; named
recTable2 to recTable5) in order to ensure that my records to be deleted are
not existing in these four tables as foreign keys. This proof is also be
done within the Workspace transaction. If proof is positive (so that records
have not occured as foreign keys in any of the four tables), I always get an
error when I try to delete the records in recTable1 on grounds of err.number
3008. The mysterious thing is that according to error description delete
action has been denied because recTable4 is already opened exclusively by
another user or because it has been opened from desktop. Definitively both
reasons are not true. So I tried to close one or two of the four tables
before I delete the records in recTable1. Then the thing run properly. (What
drives me crazy as well is that it depends on which tables I close whether I
have to close one or two of them in order that error 3008 does not occur
anymore.) Of course I do not want to implement it in this "unserious" way. I
would like to close all of the recordset-objects after delete action not
partly before.

All tables are part of an Access97 database. Database itself has been opened
in multi user mode. Visual Basic version is 5.0 with Service Pack 3.

No idea anymore!

Thanx in advance for any suggestions.

Yours, Reinhard Brandstoetter

2. Get first record

3. Are Table-type recordsets "self-refreshing"?

4. sql 7.0 query analyzer chews up 100 % cpu

5. Do Table-type recordsets "auto-refresh"?

6. CFP: Modelling Database Dynamics

7. Recordset and Oracle "Number" Data Type

8. Help Request: Running Oracle in 1972

9. HELP: "Type Mismatch" when opening recordset

10. Error 524 and 3008 - Record in use errors?

11. Error 524 and 3008 - records in use errors?

12. max of ("...","...","..")

13. Example with data type "Table"