Page 1 of 1

Execute Query on Virtual Table

Posted: Tue 13 Sep 2005 23:21
by ben
Hello,

I have a virtual table with 100 records and i need to change a record without using locate, something like

UPDATE virtualtable SET something=1 WHERE something_else=10

any idea?

Posted: Wed 14 Sep 2005 07:25
by Ikar
SQL statements is not supported by TVirtualTable.
Use something like this:

Code: Select all

tbl.First;
while not tbl.eof do begin
    if tbl.Fileds[] = ... then
        ...
    tbl.Next;
end;

Posted: Wed 14 Sep 2005 18:27
by ben
that will cause the cursor on the table to be moved.

anyway i will use the internal HEAP tables of MySQL

Posted: Wed 14 Sep 2005 21:31
by GEswin
Hi, the best is to use MySQL's temporary tables, they work nice, fast and have full SQL support ;)

Posted: Wed 14 Sep 2005 23:48
by ben
question about memory tables, if the mysql sever is remotely on another pc, the data is held to the local or remote pc? I mean everytime i update the data, their travelling around the network?

Posted: Thu 15 Sep 2005 03:32
by alec
ben wrote:if the mysql sever is remotely on another pc, the data is held to the local or remote pc?
on remoute pc (mysql server pc) of course.
ben wrote: I mean everytime i update the data, their travelling around the network?
If it is critical moment, then you can try to use additional embedded mysql server (see TMyEmbConnection in MyDAC 4+) on client pc.
I think MySQL Embedded also support temporary tables and MEMORY (HEAP) stored engine.