Table Appears Open Even After RecordSet is Closed 
Author Message
 Table Appears Open Even After RecordSet is Closed

I am trying to change the column of a table from Text to Date in Access97.
With the same database connection, I do an OpenRecordSet() and use movenext(),
update(), and close() to modify the text into the correct format for
conversion to date. Then my code goes to add a column to the table, using the
same connection. However, when I try to append my new field to the table I
get a "some other user is using the table" message. (It's in Japanese so
please forgive me for not knowing the English version message)

I take out the initial text update, and it actually can add the column. So
why is Recordset.Close() not properly releasing the table? Do I need to wait
for some unspecified amount of time for it to properly release the table? Why
does my program trip itself up like this? Is there a better way to do this?

TIA,
Jonathan Scott

--
Message posted via http://www.*-*-*.com/



Sat, 22 Dec 2007 09:34:17 GMT  
 Table Appears Open Even After RecordSet is Closed


Quote:
> I am trying to change the column of a table from Text to Date in
> Access97. With the same database connection, I do an OpenRecordSet()
> and use movenext(), update(), and close() to modify the text into the
> correct format for conversion to date. Then my code goes to add a
> column to the table, using the same connection. However, when I try
> to append my new field to the table I get a "some other user is using
> the table" message. (It's in Japanese so please forgive me for not
> knowing the English version message)

> I take out the initial text update, and it actually can add the
> column. So why is Recordset.Close() not properly releasing the table?
> Do I need to wait for some unspecified amount of time for it to
> properly release the table? Why does my program trip itself up like
> this? Is there a better way to do this?

> TIA,
> Jonathan Scott

Post your code, and maybe something will become clear.  I suppose you
might need to set the recordset object to Nothing, as well as just
closing it.  And you might try waiting for the database engine to finish
unloading its cache, using the statement

    DBEngine.Idle dbRefreshCache

But this is just speculation.

--
Dirk Goldgar, MS Access MVP
www.datagnostics.com

(please reply to the newsgroup)



Sat, 22 Dec 2007 23:55:35 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. text in a table appear close to the borders

2. msgbox open table even if cancel is clicked

3. Open to record closed on (Recordset.Clone) etc?

4. Leave recordset open, or close and reopen.

5. Leave recordset open, or close and reopen.

6. I am tired of even trying...

7. Even though I am connected to internet, Outlook cannot connect to

8. users, group, and print security menus are dimmed - even though I am owner

9. Save-Changes prompt appears even if unchanged

10. Holidays - they don't appear in my calendar even after download


 
Powered by phpBB® Forum Software © phpBB Group