Hi

if i want to use this strings

tablo.ExecSQL( 'select type_name from servers where id='+
inttostr( record_id) );
type_name:= tablo.FieldByName('type_name').AsString;

it is giving error. can i access to sqlite multiple? 
Best Regards
M.Ali VARDAR



procedure TMyThread.Execute;
var
ping: TPingSend;
record_id : integer;
type_name, server_ip, result_string : String;
tablo: TSqlite3Dataset;

begin
record_id:= main.id;
type_name:='default';

try
tablo:=TSqlite3Dataset.Create(Nil);
tablo.ExecSQL( 'select type_name from servers where id='+ inttostr( record_id) 
);
type_name:= tablo.FieldByName('type_name').AsString;
main.StatusBar1.SimpleText:=type_name;
except
main.StatusBar1.SimpleText:='error='+ inttostr(record_id);
end;


//Controlling by type

//ping
if type_name='ping' then
begin
     ping:=TPingSend.Create;
     try
        ping.ping(server_ip);
        result_string:= result_string +' - '+ IntTostr(ping.pingtime)+'ms';
     finally
        ping.Free;
     end;
end;

//try
//tablo.ExecSQL('update servers set status="'+ result_string +'" where id='+ 
inttostr( record_id)  );
//except
//main.StatusBar1.SimpleText:='error2';
//end;

tablo.close;
tablo.free;

end;               



On Tue, 16 Jan 2007 07:31:20 -0200
Luiz Americo Pereira Camara <[EMAIL PROTECTED]> wrote:

> [EMAIL PROTECTED] wrote:
> > Hi,
> > I'm working on open source project with lazarus. it is not ready for
> > release. I have problem with sqlite3 in thread.
> > if i want to create like that, thread locked and not working.
> >
> > mydataset := TSqlite3Dataset.Create(Nil);
> >
> > Do you have any idea for using?
> >   
> Can you send a test program, or better, add a bugreport?
> 
> Luiz
> 
> _________________________________________________________________
>      To unsubscribe: mail [EMAIL PROTECTED] with
>                 "unsubscribe" as the Subject
>    archives at http://www.lazarus.freepascal.org/mailarchives
> 

_________________________________________________________________
     To unsubscribe: mail [EMAIL PROTECTED] with
                "unsubscribe" as the Subject
   archives at http://www.lazarus.freepascal.org/mailarchives

Reply via email to