Hi Stev,
Prepared statements are best option, however try sqlite3_mprintf() with
'%q' as format specifier which escapes every '\' character.
Find more info in http://sqlite.org/capi3ref.html.
Bharath Booshan L.
On 8/6/07 11:50 AM, "Stephen Sutherland" <[EMAIL PROTECTED]>
wrote:
> Hi ;
>
Hi Stev,
Why not just use prepared statements?
Regards,
Eugene Wee
Stephen Sutherland wrote:
Hi ;
I am trying to treat a string before passing it through my SQL statement into the database.
I know that a single apostrophe will break the SQL statement.
So I have to replace them a
On 8/5/07, Stephen Sutherland <[EMAIL PROTECTED]> wrote:
> I am trying to treat a string before passing it through my SQL statement
> into the database.
>
> I know that a single apostrophe will break the SQL statement.
> So I have to replace them all to double apostrophes.
> But are the
Hi ;
I am trying to treat a string before passing it through my SQL statement into
the database.
I know that a single apostrophe will break the SQL statement.
So I have to replace them all to double apostrophes.
Question #1:
What may I ask is the c or C++ code to accomplish th
hi group,
i have several small questions for the group any
experiences or thoughts shared would be greatly
appreciated.
1) anybody used sqlite as a sql server? i'm thinking
of say using the embedded sqlite in PHP5 or similar.
2) anybody ever implemented something like a single
process of sqlite
John Stanton a écrit :
Alain Bertrand wrote:
In a Qt4 application, I have the following bit of code :
QString s;
bool b;
QSqlQuery q;
QSqlError err;
s= "CREATE TABLE ttd_bdata (sheetId integer primary key,";
s+="creation_date date, modif_date date,";
s+="specie
Thx, very helpfull reply. One more question: is it need to do "END"
after "BEGIN" or enought "COMMIT"?
By the way, some edition of sql query improve productivity a little bit too:
// Columns in 'data' table defined like (INTEGER, INTEGER, INTEGER, TEXT)
char * sql = sqlite3_mprintf( "INSERT INT
Thx, very helpfull reply. One more question: is it need to do "END"
after "BEGIN" or enought "COMMIT"?
By the way, some edition of sql query improve productivity a little bit too:
// Columns in 'data' table defined like (INTEGER, INTEGER, INTEGER, TEXT)
char * sql = sqlite3_mprintf( "INSERT INT
At 02:21 06/08/2007 +0200, you wrote:
I'm sorry to bother you again, but I can't figure out how to write a
trigger that will set a column to 1 when a user creates a new record :-/
Found it in "Sam's Sqlite (2004)":
CREATE TRIGGER insert_mytable_timestamp AFTER INSERT ON mytable
BEGIN
U
Hello
At 15:28 04/08/2007 -0400, you wrote:
UPDATE mytable SET timestamp = old.timestamp + 1 WHERE rowid=new.rowid;
I'm sorry to bother you again, but I can't figure out how to write a
trigger that will set a column to 1 when a user creates a new record :-/
I tried the following but neither
A common issue of high latency transactions. SQLite has a high
per-transaction overhead, which can be amortized across multiple INSERTs
or UPDATEs to improve the average INSERT rate. You are doing a single
INSERT per transaction, so wrap multiple INSERTs inside a single "BEGIN"
... "END" transa
Hi.
How can I improve productivity of this code:
a_messenger_t::data_buff_t --> std::deque< some_struct >
//
char * errors = 0;
for( a_messenger_t::data_buff_t::const_iterator it = msg.m_buff.beg
Poor comparison in this case.
Are you going to make a mathematical model when you got a little stream to
cross and you have a few available planks to do it?
RBS
-Original Message-
From: John Stanton [mailto:[EMAIL PROTECTED]
Sent: 05 August 2007 16:43
To: sqlite-users@sqlite.org
Subject
John wrote:
John wrote:
Griggs, Donald wrote:
Regarding: "
Where I get tripped up is making a typo in a multiline query that may
have destructive effects if I terminate with a ';' and allow the CLI to
execute the query. To date I have aborted the CLI with a ^C (MS
Windows). I would love have
Alain Bertrand wrote:
Joe Wilson a écrit :
--- Alain Bertrand <[EMAIL PROTECTED]> wrote:
> --- Alain Bertrand <[EMAIL PROTECTED]> wrote:
In a Qt4 application, I have the following bit of code :
QString s;
bool b;
QSqlQuery q;
QSqlError err;
s= "CREATE TABLE ttd_bdat
We learn mathematics etc so that we can make numerical models which give
us design information. Imagine trying to build every combination of a
bridge to settle on a design!
Make a mathematical model and get it close to optimal at the first attempt.
RB Smissaert wrote:
Yes, I suppose you are
RB Smissaert wrote:
But then if the base of the logarithm doesn't matter then
how is this equation going to help you?
m==N/logN
So, basically it comes down to some experimenting?
RBS
No, the relationship is set by the math. An absolute measurement
requires that you experiment to discover th
John wrote:
Griggs, Donald wrote:
Regarding: "
Where I get tripped up is making a typo in a multiline query that may
have destructive effects if I terminate with a ';' and allow the CLI to
execute the query. To date I have aborted the CLI with a ^C (MS
Windows). I would love have a means of esca
Hi,
The sample code is below. I am trying this on windows(xp)(sqlite 3.3.13) and
have disabled almost all sqlite features.
When createUsingExec variable is true in the sample code, I am able to
reproduce the problem.
Thanks
karthik
//== begin
Griggs, Donald wrote:
Regarding: "
Where I get tripped up is making a typo in a multiline query that may
have destructive effects if I terminate with a ';' and allow the CLI to
execute the query. To date I have aborted the CLI with a ^C (MS
Windows). I would love have a means of escaping/cancelli
Regarding: "
Where I get tripped up is making a typo in a multiline query that may
have destructive effects if I terminate with a ';' and allow the CLI to
execute the query. To date I have aborted the CLI with a ^C (MS
Windows). I would love have a means of escaping/cancelling back to the
prompt wi
[EMAIL PROTECTED] wrote:
Scott Derrick <[EMAIL PROTECTED]> wrote:
This is probably a stupid question but has frustrated me a couple of times.
When using the command line interface sqlite3, a couple of times I have
forgotten to use the "." before a command. After that I get a "...>"
prompt t
Joe Wilson a écrit :
--- Alain Bertrand <[EMAIL PROTECTED]> wrote:
> --- Alain Bertrand <[EMAIL PROTECTED]> wrote:
In a Qt4 application, I have the following bit of code :
QString s;
bool b;
QSqlQuery q;
QSqlError err;
s= "CREATE TABLE ttd_bdata (sheetId integer primary
Yes, I suppose you are right there.
I will see if I can put together a report that runs all possible types of
queries (sequentially) and then see if I have left anything out that would
cause problems.
RBS
-Original Message-
From: Gerry Snyder [mailto:[EMAIL PROTECTED]
Sent: 05 August 20
Queries where there is a glob comparison on a string that could be
interpreted as a number always seem a bit slower than when comparing to a
string that can't be compared to a number.
So for example:
select f from t where f glob '137*'
is slower than:
select f from t where f glob 'abc*'
Is this t
25 matches
Mail list logo