Execute Query on Virtual Table

Execute Query on Virtual Table

Postby ben » Tue 13 Sep 2005 23:21

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?
ben
 
Posts: 119
Joined: Wed 17 Nov 2004 19:48

Postby Ikar » Wed 14 Sep 2005 07:25

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;
Ikar
 
Posts: 1693
Joined: Thu 28 Oct 2004 13:56

Postby ben » Wed 14 Sep 2005 18:27

that will cause the cursor on the table to be moved.

anyway i will use the internal HEAP tables of MySQL
ben
 
Posts: 119
Joined: Wed 17 Nov 2004 19:48

Postby GEswin » Wed 14 Sep 2005 21:31

Hi, the best is to use MySQL's temporary tables, they work nice, fast and have full SQL support ;)
GEswin
 
Posts: 186
Joined: Wed 03 Nov 2004 16:57
Location: Spain

Postby ben » Wed 14 Sep 2005 23:48

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?
ben
 
Posts: 119
Joined: Wed 17 Nov 2004 19:48

Postby alec » Thu 15 Sep 2005 03:32

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.
alec
 
Posts: 20
Joined: Wed 24 Aug 2005 09:28
Location: Africa


Return to MySQL Data Access Components