I'm not an expert on Aducom SQLite components, but anyway i'll try to help.
Maybe you should consider using parameters in your query. Parameters in
SQLite start with ':', '@' or '?', however ASGSQlite supports only ':' in my
opinion. Your SQL query should look like this:
INSERT INTO Stuff (Title)
>Question, does the %q operator offer any advantages over calling QuotedStr ?
Yes: The %q operator just duplicates internal quotes, it does insert quotes at
the beginning and the end of the string like QuotedStr does. You can can still
use sqlite3_mprintf's %Q operator for that.
Ralf
-
"Clay Dowling" <[EMAIL PROTECTED]> wrote:
> John Elrick wrote:
>
> >> A much better solution than QuotedStr is to use queries with parameters.
> >> If you're going to be running the query multiple times it also gives you
> >> a
> >> speed boost.
> >>
> >
> > True, however, that assumes you will be
John Elrick wrote:
>> A much better solution than QuotedStr is to use queries with parameters.
>> If you're going to be running the query multiple times it also gives you
>> a
>> speed boost.
>>
>
> True, however, that assumes you will be running the query multiple times
> in a row, which I haven
Clay Dowling wrote:
John Elrick wrote:
// Input := 'Let's meet at the pub tonight!';
MyFormat := 'insert into stuff (title) values (%s)';
SQL := Format(MyFormat, QuotedStr(Input));
try
ASQLite3DB1.Database := db;
ASQLite3DB1.DefaultDir := ExtractFileDir(Application.ExeName);
ASQ
John Elrick wrote:
> // Input := 'Let's meet at the pub tonight!';
> MyFormat := 'insert into stuff (title) values (%s)';
> SQL := Format(MyFormat, QuotedStr(Input));
>
> try
> ASQLite3DB1.Database := db;
> ASQLite3DB1.DefaultDir := ExtractFileDir(Application.ExeName);
> ASQLite3DB1.O
Ralf Junker wrote:
I'm having a problem saving strings into a colum from a Delphi application
because they might contain the ( ' ) single quote character:
Is there a function I should call either in SQLite or Delphi before running the
SQL query?
Why don't you use the '%q' operator of SQ
>I'm having a problem saving strings into a colum from a Delphi application
>because they might contain the ( ' ) single quote character:
>
>Is there a function I should call either in SQLite or Delphi before running
>the SQL query?
Why don't you use the '%q' operator of SQLite's sqlite3_mprint
Gilles Ganault wrote:
Hello
I'm having a problem saving strings into a colum from a Delphi
application because they might contain the ( ' ) single quote character:
=
// Input := 'Let's meet at the pub tonight!';
MyFormat := 'insert into stuff (title) values ('''%s')';
SQL := Forma
Hello
I'm having a problem saving strings into a colum from a Delphi application
because they might contain the ( ' ) single quote character:
=
// Input := 'Let's meet at the pub tonight!';
MyFormat := 'insert into stuff (title) values ('''%s')';
SQL := Format(MyFormat, Input);
try
10 matches
Mail list logo