Board index » delphi » MS Access, TQuery, and SQL UPDATES...

MS Access, TQuery, and SQL UPDATES...

I'm trying to ExecSQL a SQL UPDATE query on an Access database...

I keep coming up with an exception that states that the table in question
is read-only...

I've checked the table in Access and it should not be read-only which
leads me to believe there is something I am missing about the TQuery
component....

How do I make sure the table is not read-only?

Thanks.

 

Re:MS Access, TQuery, and SQL UPDATES...


You have probably set your ODBC driver to be read-only.

Nick Spurrier (MoDESoft, UK)

Re:MS Access, TQuery, and SQL UPDATES...


there seems to be 2 places where i could make an Access database read-only
with the
ODBC driver... both places seem to be set correctly...

also, i've found that the SQL UPDATE command works correctly with the
delphi database explorer.

i assume the explorer is using the same drivers as TQuery... so it must be
something with TQuery.

has anybody done an UPDATE command on an Access database successfully with
Delphi 2.01 using
TQuery???

Nick Spurrier <n...@mode.co.uk> wrote in article
<VA.00000041.10affea4@modesoft>...

Quote
> You have probably set your ODBC driver to be read-only.

> Nick Spurrier (MoDESoft, UK)

Re:MS Access, TQuery, and SQL UPDATES...


Hello,

Do you have requestLive turned set to yes on your TQuery? Try setting
RequestLive to false.

Kelly

Re:MS Access, TQuery, and SQL UPDATES...


Quote
"Bob Casazza" <rcasa...@sprynet.com> wrote:
>I'm trying to ExecSQL a SQL UPDATE query on an Access database...
>I keep coming up with an exception that states that the table in question
>is read-only...
>I've checked the table in Access and it should not be read-only which
>leads me to believe there is something I am missing about the TQuery
>component....

It may not be the same problem, but I encountered this when attempting
to migrate an SQL database to Paradox :

The TQuery's SQL included an ORDER BY clause, which caused the Paradox
dataset to be read only. Remove the order by, and it is writable....

This is a real nuisance, because I have lost my ordering, and don't
want to go to TTable objects.

Hope that helps

Mike King

Other Threads