add records to access table fails with back cannot update read-only database

add records to access table fails with back cannot update read-only database

Post by Wiemer M.J. Kui » Sat, 01 Jul 2000 04:00:00



i download a file from our as400, convert it to a table in access (linked or
imported) then i run a update query to "nsert into"the records in another
table . works great.
now i take the exact query, translate it to pure and run it from a vb6 app
with ado 2.5

i get back cannot update read-only database

any ideas?

tia

wiemer kuik

 
 
 

add records to access table fails with back cannot update read-only database

Post by hans-peter muelle » Wed, 05 Jul 2000 04:00:00


If you  open a recordset in ADO like:
rs.open "select * from <yourTable>", con
the opened recordset is read-only with forward cursor.
rs.CursorLocation= adUseClient     ' Advantage: Recordcount works
rs.CursorType=adOpenStatic
...
you are able to update the recordset.

 
 
 

1. Cannot add record to Visual Foxpro table after deleting all records in table

After:
1. opening adodb connection with
vfpoledb.dll and datasource=path$ &
foxprofile.dbc successfully
2. deleting all records from table1 in
foxprofile.dbc successfully with
connection.execute("delete from table1") (I
can see the records being marked as deleted
in the VFP IDE) ,

I cannot add any record to table1 that has a
primary key like one of the deleted records.
So I execute connection.execute("pack
table1") and get "ADO error: File is in use".
(but my foxpro IDE is closed and only my VB6
program has the *.dbc open).

How can I delete (and pack if necessary) all
the records so they are gone for good from
the table?

Please!
Thank you.

2. Dialog boxes

3. Cannot Get Back The Last Updated Record Using ODBC

4. Oracle DBAs needed for Big 5 Firm in Dallas, TX

5. After restoring a database using pg_restore , cannot insert or update records in tables with primary keys

6. SPLASH/TITLE PAGE

7. Add records to an empty table - AddNewX.cpp example fails with an empty table

8. Can a TQuery know that his table has been changed by another Dataset?

9. Trigger to update one table when records are added to another table

10. Add records to without reading the table first????

11. Update failed / Table is readonly

12. Update failed / Table is ReadOnly

13. Access ADP cannot add row to table