Run-Time Error 3197 - please help its driving me insane 
Author Message
 Run-Time Error 3197 - please help its driving me insane

Hi,

I have a database which is split into a program and data database. I have
written a routing in the program DB which imports data from a 3rd database
into the new data database and makes various structural changes after the
data has been appended.

In one of the several import/modification routines I have written I get the
following error message when I try to use the EDIT method of a recordset.

    Run-time error 3197
    The Microsoft Jet Database engine stopped the process because you and
another user are attempting to change
    the same data at the same time.

The error message is totally misleading because I am the only one using the
DB's and all the DB's have been opened in exclusive mode with no problems.

In psuedo code form this is what the procedure does :
        Declare some variables
        Change mouse pointer to an hourglass
        Creates a new querydef object giving it a name and SQL
        The querydef is appended to the DB I am going to get the data from.
        The new query is executed which places the data in my new backend
data db
        In the new backend DB I copy data (just imported) from one field
into a new table
        Using SQL I add a new temporary field to the backend data DB table I
imported the data into.
        I open a recordset -
OpenRecordset("tblProduct",dbOpenTable,dbConsistent+dbSeeChanges,
dbPessimistic)

        I then enter a loop (while not end of recordset)
                 Edit current record

Crash bang wallop the above edit line causes the run time error mentioned.
I have tried doing the following things :
        1) Reboot the machine (running NT)
        2) Repaired the databases
        3) Closed the databases and specifically reopened them just before
opening the recordset.
        4) Gone through all other code and procedures relating to importing
and made sure all recordsets and other
            objects are closed and set to nothing, (even though this should
make no difference since there in different
            procedures).

The reason I did (4) is because if I change the recordset to open a
different table it allows me to edit no problems, which suggests that there
is a recordset somewhere that is locking the table, or a query or something
thats still running. BUT this is the really frustrating part, I have NO
global variables, all the variables I use are local and as you
can see from the pseudo code I don't do any thing really before I open the
recordset so I really can't tell whats going wrong.

Please help.

Peter
--
Peter Row



Mon, 23 Sep 2002 03:00:00 GMT  
 Run-Time Error 3197 - please help its driving me insane
if i read this right,
    you add a field to an attached table
    then try to edit data in the attached table

you should refresh the link to the attached table
after changing the table structure.

Quote:

>Hi,

>I have a database which is split into a program and data database. I have
>written a routing in the program DB which imports data from a 3rd database
>into the new data database and makes various structural changes after the
>data has been appended.

>In one of the several import/modification routines I have written I get the
>following error message when I try to use the EDIT method of a recordset.

>    Run-time error 3197
>    The Microsoft Jet Database engine stopped the process because you and
>another user are attempting to change
>    the same data at the same time.

>The error message is totally misleading because I am the only one using the
>DB's and all the DB's have been opened in exclusive mode with no problems.

>In psuedo code form this is what the procedure does :
>        Declare some variables
>        Change mouse pointer to an hourglass
>        Creates a new querydef object giving it a name and SQL
>        The querydef is appended to the DB I am going to get the data from.
>        The new query is executed which places the data in my new backend
>data db
>        In the new backend DB I copy data (just imported) from one field
>into a new table
>        Using SQL I add a new temporary field to the backend data DB table
I
>imported the data into.
>        I open a recordset -
>OpenRecordset("tblProduct",dbOpenTable,dbConsistent+dbSeeChanges,
>dbPessimistic)

>        I then enter a loop (while not end of recordset)
>                 Edit current record

>Crash bang wallop the above edit line causes the run time error mentioned.
>I have tried doing the following things :
>        1) Reboot the machine (running NT)
>        2) Repaired the databases
>        3) Closed the databases and specifically reopened them just before
>opening the recordset.
>        4) Gone through all other code and procedures relating to importing
>and made sure all recordsets and other
>            objects are closed and set to nothing, (even though this should
>make no difference since there in different
>            procedures).

>The reason I did (4) is because if I change the recordset to open a
>different table it allows me to edit no problems, which suggests that there
>is a recordset somewhere that is locking the table, or a query or something
>thats still running. BUT this is the really frustrating part, I have NO
>global variables, all the variables I use are local and as you
>can see from the pseudo code I don't do any thing really before I open the
>recordset so I really can't tell whats going wrong.

>Please help.

>Peter
>--
>Peter Row



Sat, 28 Sep 2002 03:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Error - 3197 - Please help

2. Runtime Error 3197

3. Help. DAO 3197 error with single user

4. Error '372' driving me insane

5. Help - the Shape object in Word is driving me insane

6. Please help: run-time error 3014-can't open any more tables

7. Experts, please help with Run-time Errors!

8. Run Time Error 20504 - URGENT Please help

9. Run Time Error (Please help)

10. Help please with "Run time error"

11. Run time error '3709' - Please Help

12. Object Variable not set , Run Time error 91, please Help

 

 
Powered by phpBB® Forum Software