Board index » delphi » Tquery and "Table is Closed"

Tquery and "Table is Closed"

Hello all u delphi gurus out there !!

I have p big problem i hope you could help me with!!!

My program does the following.

Read at textfile and pareses it and put data i variables.
Then it tries til insert rows in the MSACCESSDB based on the data in
the variables.

I use the Tquery object and have set the SQL property correct.
I use  Tquery.paramByName('name').AsXXX to set the parameters.

I use Tquery.ExecSQL to run the SQL Insert statement.

Now an insert SQL statement does not return a resultset so i should be
possible to use the Tquery.execSQL method but it doesnt work..

I get the errormessage 'Table is read-only.'.

Why is that ??

 

Re:Tquery and "Table is Closed"


 Hi Christion.

I think you have set RequestLive to TRUE. On ExecSQL's you nedd to set it to
FALSE.
Regards
Stig Johansen
DATAgruppen Danmark A/S

Christian Her? wrote in article <342911da.26601...@193.212.205.129>...

Quote

>Hello all u delphi gurus out there !!

>I have p big problem i hope you could help me with!!!

>My program does the following.

>Read at textfile and pareses it and put data i variables.
>Then it tries til insert rows in the MSACCESSDB based on the data in
>the variables.

>I use the Tquery object and have set the SQL property correct.
>I use  Tquery.paramByName('name').AsXXX to set the parameters.

>I use Tquery.ExecSQL to run the SQL Insert statement.

>Now an insert SQL statement does not return a resultset so i should be
>possible to use the Tquery.execSQL method but it doesnt work..

>I get the errormessage 'Table is read-only.'.

>Why is that ??

Re:Tquery and "Table is Closed"


On Fri, 26 Sep 1997 07:20:12 +0200, "Stig Johansen"

Quote
<d...@inet.zitech.dk> wrote:
> Hi Christion.

>I think you have set RequestLive to TRUE. On ExecSQL's you nedd to set it to
>FALSE.
>Regards
>Stig Johansen
>DATAgruppen Danmark A/S

Hello Stig i allready did that: It does not work.

I have the same code working well against a paradox database.
My guess it is some problem between the microsoft ODBC and The Borland
Database Engine.

Quote
>Christian Her? wrote in article <342911da.26601...@193.212.205.129>...

>>Hello all u delphi gurus out there !!

>>I have p big problem i hope you could help me with!!!

>>My program does the following.

>>Read at textfile and pareses it and put data i variables.
>>Then it tries til insert rows in the MSACCESSDB based on the data in
>>the variables.

>>I use the Tquery object and have set the SQL property correct.
>>I use  Tquery.paramByName('name').AsXXX to set the parameters.

>>I use Tquery.ExecSQL to run the SQL Insert statement.

>>Now an insert SQL statement does not return a resultset so i should be
>>possible to use the Tquery.execSQL method but it doesnt work..

>>I get the errormessage 'Table is read-only.'.

>>Why is that ??

Other Threads