Avoid locking problem

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Within my Access progam I want to use a linked Progress table (Merant ODBC
driver) which is havily used by the users of the Pogress program. If I try to
use the tabel in a selection query or try to dump the table in a new one
through an action query I get an ODBC error telling me that I cannot get a
lock on (a specific record in) the table if any of the Progress users is
editing the table or adding a record to it.

Is it possible to avoid this situation? I am thinking of making a cloned
recordset of the table (DAO) and dumping this recordset in a new table, but I
don't know how to dump a recordset(Clone) into a table. Or is there a more
elegant solution?

Thank you for helping out!

Maarten
 
Could you create a snapshot type recordset & then use the data from
there?

(untested)

dim db as database, rs as recordset
set db = currentdb()
set rs = db.openrecordset("<name of linked table>", dbOpenSnapshot)
rs.movelast
' now rs contains a snapshot of the whole table.

I don't know, off hand, whether that approach would still get locking
errors, or not. I suepect that it might. But it would be easy to try.

HTH,
TC [MVP Access]
 
Hello TC,

That is exactly what I had in mind too. My problem is that I want to create
a new table from this recordset (i.e. one that isn't contantly in use by
others) or ad the recordset to a table (if I succeed in the first option, I
can do this by making an action query on the new table of course). Do you
know of an easy way to dump a recordset into a table??

Thanks on beforehand,

Maarten

"TC" schreef:
 
Back
Top