Thank you guys,

I guess i found my problem.

>Multiple processes can have the same database open at the same time.
>Multiple processes can be doing a SELECT at the same time. But only
>one process can be making changes to the database at any moment in
>time, however.

http://www.sqlite.org/faq.html#q7

a thread want same time select and update.  How can i handle this
value?  Do you know?

sqlite_busy_timeout()


When SQLite tries to access a file that is locked by another process,
the default behavior is to return SQLITE_BUSY. You can adjust this
behavior from C code using the sqlite3_busy_handler() or
sqlite3_busy_timeout()  API functions.

Best regards
M.Ali VARDAR


> [EMAIL PROTECTED] wrote:
> > 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) ); 
> ExecSql is only for data manipulation sql. For select query use Open.
> 
> tablo.sql:= 'select type_name from servers where id='+
> inttostr( record_id); tablo.open;
> 
> 
> 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