I've just add an unlink of the db in the script to test it and found
that the code does not work correctly with DBD::SQLite version 1.08 (on
my host) but works with version 1.11 (on another host).
So I'll upgrade my host version. Thanks a lot.
use strict;
use DBI qw(:sql_types);
my $db='/tmp/
Hello David,
So, what do you see when you use the debugger? I use multi-threads
with SQLite in window using VC6 and don't have any problems like that
so, I'd be looking for programming problems. Look at the value of the
pointer you get back from open and make sure it's the same one you
pass to clo
While executing 'SELECT REGION FROM EMPLOYEE' I came across a column that is
SQLITE_NULL as far as sqlite3_column_type is concerned, but really is
varchar(20) if you ask for sqlite3_column_decltype? Is varchar(20) illegal
in SQLite? Certainly looks like "typename ( number )" is okay at
http://www.s
I've started writing my first wrappers for SQLite compiled inside the
Frontier Kernel and I've run into a snag. I have one verb that calls
sqlite3_open. It returns successfully and sets the db properly. If, in that
same routine, I call sqlite3_close, it works successfully.
But, if I return from t
This works -
char *stmnt = "UPDATE systab SET sys_state = "
"(SELECT sys_state FROM systab WHERE item_id = 'NEXT_BATCH_ID') + 1 "
"WHERE item_id = 'NEXT_BATCH_ID';";
Deepak Kaul wrote:
I have an addition question. Is is possible to increment a value in an
update statement? If so how
Hi All,
I don't know whether this list is a right place to post code contributions for
SQLite. Is it?
As a quick try I'd like to suggest a small change to shell.c file to eliminate
several warnings from Microsoft compiler when compiling with W4:
Index: shell.c
===
I cannot reproduce the problem. Your [slightly modified] code and output
follows: {you did "use strict" of course...}
#!/opt/web/bin/perl -w
use strict;
use DBI qw(:sql_types);
my $sql;
my $sth;
my $dbh = DBI->connect(
"dbi:SQLite:dbname=/tmp/stest.db",
{
RaiseError => 1,
Maybe you declared the column as numeric (integer, number)? In that case,
later versions of SQLite might be doing the conversion for you (I can't
remember for sure, but I seem to recall this is the case). You might need to
declare the column as text.
At least what you posted is missing the
.schema
CREATE TABLE mytable(varint text);
Sorry, but it's working with the do function.
However it's not working when I use bind variables even if I force the
SQL_VARCHAR type :
use DBI;
$dbh= DBI->connect("dbi:SQLite:dbname=./test.db",{ RaiseError => 1,
AutoCommit => 1 });
$stmt=$dbh->pr
Hello Deepak,
your example is valid SQL. I have tried it and it works in sqlite (of
course).
Martin
Martin
Deepak Kaul wrote:
I have an addition question. Is is possible to increment a value in
an update statement? If so how would the sql statement be written?
For example
Table addition
I have an addition question. Is is possible to increment a value in an
update statement? If so how would the sql statement be written?
For example
Table addition with the following columns
unique_id, count
I want something like the following
UPDATE addition SET count = count + 1 WHERE unique_
Can you run .schema on the table?
-Original Message-
From: Cyril Scetbon [mailto:[EMAIL PROTECTED]
Sent: Friday, March 17, 2006 1:16 AM
To: sqlite-users@sqlite.org
Subject: Re: [sqlite] DBD::SQLite
just a $dbh->do("insert into mytable(varint) values ('01234')";
It's not working correctl
Hi Robert,
I have never used SQLite with sqlite3_prepare(),
sqlite3_step(), sqlite3_reset() and sqlite3_finalize().
Do you have any code example that i can use to avoid the use of
sqlite_get_table() ?
Thank you,
Eduardo
---Mensaje original---I don't use the sqlite_get_table() function, and don'
I don't use the sqlite_get_table() function, and don't recommend it to
others to use. As I understand it, it's there for legacy application
support. New programs written for SQLite should use sqlite3_prepare(),
sqlite3_step(), sqlite3_reset() and sqlite3_finalize() instead.
Robert
- Or
Hi Robert,
I was talking about 3 selects satements using the same connections.
Anyway, thank you very much for your advice of using "PRAGMA cache
size=8", that solved all the problems related to sqlite3_exec memory
problems with a select statement, baut the memory problems are not solved at
all
> Hi Ulrich, thanks for the answer but I need to implement a
> function regexp() for SQLite inside a program in C++.
Look at boost:
http://www.boost.org/libs/regex/doc/introduction.html
Regards,
David Carter-Hitchin.
--
Royal Bank of Scotland
Interest Rate Derivatives IT
Hi Ulrich, thanks for the answer but I need to implement a function regexp() for
SQLite inside a program in C++.
Thanks, Danilo.
Ulr
Hi Danilo,
take a look at
http://aspn.activestate.com/ASPN/docs/ActiveTcl/tcl/TclCmd/re_syntax.htm
Kind regards
Ulrich
On Friday 17 March 2006 10:13, Danilo wrote:
> Hi to All ,
> I'm looking for further information about REGEXP
> (http://www.sqlite.org/lang_expr.html).
> Someone knows how to
Hi to All ,
I'm looking for further information about REGEXP
(http://www.sqlite.org/lang_expr.html).
Someone knows how to point out me some examples!
Thanks, Danilo.
Home Page: http://www.digitazero.org
venerdì 17 marzo 2006, 9.07
19 matches
Mail list logo