I can't spot what I'm doing wrong here, maybe somebody else can see it ...
I define a function:
static void sqliteTimeToHms(sqlite3_context *context, int argc, sqlite3_value
**argv)
{
sqlite3_result_text(context, "0:00:00", 8, NULL);
}
Then call
rc = sqlite3_create_function16(db, L"Ti
I think i found solution.
The problem is that DBD::SQlite->disconnect() method execute
sqlite3_close() function.
This function return SQLITE_BUSY in case if there are any active statement.
>From API:
"Applications should finalize all prepared statements and close all
BLOBs associated with the sqlit
Nicolas Williams <[EMAIL PROTECTED]> wrote:
> On Tue, Feb 05, 2008 at 01:30:01AM +, [EMAIL PROTECTED] wrote:
> > And yet nearly everyone I know loaths that behavior. The
> > overwhelming majority of users prefer mailing list replies
> > to go back to the mailing list *only*.
>
> Users need to
On Tue, Feb 05, 2008 at 01:30:01AM +, [EMAIL PROTECTED] wrote:
> And yet nearly everyone I know loaths that behavior. The
> overwhelming majority of users prefer mailing list replies
> to go back to the mailing list *only*.
Users need to learn to do "list reply" or "reply all" :)
Getting dup
Hello
I can't use the cursor keys ("arrows") when using SQLite on Linux from
a
remote Windows host. Both are supposed to be set to "xterm", but when I hit
eg. the up key in SQLite, it shows "^[[A". Other applications work OK. I've
tried using vt100 instead of xterm, but it made no diff
* [EMAIL PROTECTED] <[EMAIL PROTECTED]> [2008-02-05 02:35]:
> The overwhelming majority of users prefer mailing list replies
> to go back to the mailing list *only*.
Reply-To munging is still harmful, because if the original sender
had set this header, that information is lost; if someone really
w
Hello,
> What do you expect to see? From the code, I'm guessing something like:
This is "test-case" program for testing DBD-SQLite behavior. Dumper is
only for be sure, that data was read correctly from database.
> If you're just trying to silence the "closing dbh with active handles..."
> wa
[EMAIL PROTECTED] wrote:
> In a semi-related rant: Setting up a new mailing list is
> *way* harder than it needs to be. Way, Way harder. In order
> to go from ezmlm to GNU mailman, we had to prototype the
> setup on a separate machine, then spend a day debugging
> the setup after transferring it
On Tue, 5 Feb 2008, [EMAIL PROTECTED] wrote:
> One finds various screeds such as the one Doug references above. And on
> the configuration screen for GNU mailman, it "strongly recommends" that
> replys be to the author and not to the list.
>
> And yet nearly everyone I know loaths that behavior. T
Doug Currie <[EMAIL PROTECTED]> wrote:
>
> > Please set the list so default reply is to the list.
>
> http://www.unicom.com/pw/reply-to-harmful.html
>
One finds various screeds such as the one Doug references
above. And on the configuration screen for GNU mailman,
it "strongly recommends" that
On Monday, February 04, 2008 P Kishor wrote:
> On 2/4/08, Clark Christensen <[EMAIL PROTECTED]> wrote:
>> So, I sent a reply this morning to a list message, and it seems to have gone
>> to the OP's email address rather than to the list (sorry bash).
>>
>> I don't remember having that issue with
On 2/4/08, Clark Christensen <[EMAIL PROTECTED]> wrote:
> So, I sent a reply this morning to a list message, and it seems to have gone
> to the OP's email address rather than to the list (sorry bash).
>
> I don't remember having that issue with the old software (ezmlm). To fix, is
> it a client
Sorry, this was mis-addressed. Should have gone to the list...
- Forwarded Message
From: Clark Christensen <[EMAIL PROTECTED]>
To: Alexander Batyrshin <[EMAIL PROTECTED]>
Sent: Monday, February 4, 2008 9:46:49 AM
Subject: Re: [sqlite] DBD::SQLite 1.14 prepare_cached bug?
bash,
What do
So, I sent a reply this morning to a list message, and it seems to have gone to
the OP's email address rather than to the list (sorry bash).
I don't remember having that issue with the old software (ezmlm). To fix, is
it a client configuration, or is there a reply-to header that should be set i
After removing ANALYZE and VACUUM things are going fast enough. I assume
I don't need to ANALYZE because the index is being created from scratch
anyway and VACUUM I can avoid as well, because I don't expect the
database to opened with any previous versions of SQLite anyway.
Thanks!
Dennis
--
I'll try taking out the ANALYZE and VACUUM and see if it helps. I'm
using transactions and I am creating the index after the update (and
dropping it before). So, the only 2 possible delays are in those two
commands, from what I can see...
The problem is that it's actually inside a Windows service,
Hmm, strange - my testing produces very slow results (it took over a
minute to update 120K rows).
Maybe it's because I'm also creating an index on the new row and doing
an ANALYZE - do these 2 operations take considerable amount of time?
There's also a VACUUM later on, which might be slow? (The d
On 2/4/08, Dennis Volodomanov <[EMAIL PROTECTED]> wrote:
> Hmm, strange - my testing produces very slow results (it took over a
> minute to update 120K rows).
well, for one, you are adding different stuff from me.
>
> Maybe it's because I'm also creating an index on the new row and doing
> an ANA
Could someone please give me a clue on why I'm getting this message "SQL
error: unrecognized token: ""select" "
from the command line using Bash for Dos and a sh script?
Thanks for any help,
Carl
--
Carl Lindgren
C. R. Lindgren Consulting / Business on the Desktop
Using Bash for Dos and MS-KS
On 2/4/08, Dennis Volodomanov <[EMAIL PROTECTED]> wrote:
> Oh, that looks simpler than I thought. Thank you for the reply!
not only is it simple...
...
>
> On 04-Feb-2008, at 3:41 PM, Dennis Volodomanov wrote:
>
> > Is that possible? If not, I'll have to do it in the code, but that
> > will
> > p
Oh, that looks simpler than I thought. Thank you for the reply!
Dennis
-Original Message-
From: Steven Fisher [mailto:[EMAIL PROTECTED]
Sent: Tuesday, February 05, 2008 10:50 AM
To: General Discussion of SQLite Database
Subject: Re: [sqlite] Is it possible to do this using only SQL?
On 04-Feb-2008, at 3:41 PM, Dennis Volodomanov wrote:
> Is that possible? If not, I'll have to do it in the code, but that
> will
> probably be slower and I'm expecting to have tens of thousands of
> rows.
Sure:
sqlite> create table x(a);
sqlite> insert into x(a) values('ABC');
sqlite> inser
Hello all,
I'm not sure if it's possible to do this using only SQL, so I'd like to
ask:
I need to add a column to a table which will be populated with data from
another column in that table, but converted to lower-case.
So, in pseudo-code I need to do this:
ALTER TABLE MyTable ADD C
P Kishor wrote:
>
>
> sqlite> select t.* from test t join (select name, max(weight) as m
> from test group by name) w on t.weight = w.m and t.name = w.name;
>
To me the following almost identical query is more readable, but I guess
it is objectively better only if you are having trouble with th
I wrote a function to traverse the linked list and print the zSql to stderr.
There was indeed a sql statement being left open by my code!
Thats a really usefull debugging technique. I might write an extension to
implement this in a more formally.
Thanks,
Ken
[EMAIL PROTECTED] wrote: Ken wrote
On 2/4/08, Igor Tandetnik <[EMAIL PROTECTED]> wrote:
> P Kishor <[EMAIL PROTECTED]> wrote:
> > On 2/4/08, Piotr Budny
> > <[EMAIL PROTECTED]> wrote:
> >> Now, I want to get the ID for such max rows:
> >>
> >> select id,name,max(weight) from test group by name;
> >
> > sqlite> select t.* from test t
On 2/4/08, Igor Tandetnik <[EMAIL PROTECTED]> wrote:
> Piotr Budny <[EMAIL PROTECTED]> wrote:
> > select name,max(weight) from test group by name;
> >
> > The result is fine:
> > A|50
> > B|1
> > C|123
> >
> > Now, I want to get the ID for such max rows:
> > select id,name,max(weight) from test gro
P Kishor <[EMAIL PROTECTED]> wrote:
> On 2/4/08, Piotr Budny
> <[EMAIL PROTECTED]> wrote:
>> Now, I want to get the ID for such max rows:
>>
>> select id,name,max(weight) from test group by name;
>
> sqlite> select t.* from test t join (select name, max(weight) as m
> from test group by name) w on
Piotr Budny <[EMAIL PROTECTED]> wrote:
> select name,max(weight) from test group by name;
>
> The result is fine:
> A|50
> B|1
> C|123
>
> Now, I want to get the ID for such max rows:
> select id,name,max(weight) from test group by name;
>
> 2|A|50
> 3|B|1
> 15|C|123
>
> It is OK.
It's only OK by
On 2/4/08, Piotr Budny <[EMAIL PROTECTED]> wrote:
> Hello,
> I've got strange behaviour, I want to select row ID of MAX(something) row for
> group:
>
> CREATE TABLE "test" ( "id" INTEGER , "name" CHAR(50) , "weight" INTEGER );
> INSERT INTO "test" VALUES(1,'A',1);
> INSERT INTO "test" VALUES(2,'A
Dnia poniedziałek, 4 lutego 2008, Simon Davies napisał:
> Hi Piotr,
Hello,
> Looks fine to me.
> Isn't 123 the max weight for those rows with name 'C'?
Yes, the "C" is the right answer, but that row (row with max weight value) is
not a row with ID=10. The row with max val is row with ID=15.
vi
Hi Piotr,
Looks fine to me.
Isn't 123 the max weight for those rows with name 'C'?
Rgds,
Simon
On 04/02/2008, Piotr Budny <[EMAIL PROTECTED]> wrote:
> Hello,
> I've got strange behaviour, I want to select row ID of MAX(something) row for
> group:
>
> CREATE TABLE "test" ( "id" INTEGER , "name" C
Hello,
I've got strange behaviour, I want to select row ID of MAX(something) row for
group:
CREATE TABLE "test" ( "id" INTEGER , "name" CHAR(50) , "weight" INTEGER );
INSERT INTO "test" VALUES(1,'A',1);
INSERT INTO "test" VALUES(2,'A',50);
INSERT INTO "test" VALUES(3,'B',1);
INSERT INTO "test"
The sqlite3_db_handle returns a different address for my statements than the
database session address. (using sqlite3_open)
Should it return the .aDb field instead of the pVfs ?
Thanks,
Ken
___
sqlite-users mailing list
sqlite-users@sqlite.org
htt
Ken <[EMAIL PROTECTED]> wrote:
> Hi all,
>
> I'm getting a sqlite error when running sqlite3_close. The error indicates
> that there are open statements.
>
> To the best of my knowledge all statements are closed. I loooked at the
> sqlite3_close function and call to close the virtual tables
Hi all,
I'm getting a sqlite error when running sqlite3_close. The error indicates
that there are open statements.
To the best of my knowledge all statements are closed. I loooked at the
sqlite3_close function and call to close the virtual tables appears to be
causing this issue.
My ques
table a: dict_base
table b: dict_user
condition: wether 'sz_word' = 'X' increase the value of 'dw_uses' by 1
sz_word could be in either table, dw_uses must be updated on the pertinent
table/s though.
Sorry for not being too clear :)
Thanks again
- Original Message -
From: "Fowler, Je
Gilles wrote:
> At 22:47 04/02/2008 +1100, John Machin wrote:
>
>> Well, obviously(?) you are closer to success with "\t" than with '\t'.
>> You probably have an extra unseen TAB. It won't like that NULL.
>>
>
> Thanks, but no matter what I try, it doesn't work:
> - just two columns, assu
Ken <[EMAIL PROTECTED]> wrote:
> Amalgamation fails to compile when -DSQLITE_OMIT_VIEW is defined.
>
Neither the nor the preprocessed sources work with -DSQLITE_OMIT macros.
If you need to use -DSQLITE_OMIT, then you will need to compile on
Unix using the original source code.
Both the amalgama
Gussimulator <[EMAIL PROTECTED]>
wrote:
> I have a field I need to update given a condition, but I don't know
> wether the condition occurs in table A or table B, how can I perform
> this query?
>
> I have 2 identical tables in design, but one contains system data and
> the other one contains user
Without more info, here's the general approach:
UPDATE c
SET int_field = int_field+1
WHERE (table a condition) OR (table b condition)
-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Gussimulator
Sent: Monday, February 04, 2008 1:57 PM
To: sqlite-users@sql
I have a field I need to update given a condition, but I don't know wether the
condition occurs in table A or table B, how can I perform this query?
I have 2 identical tables in design, but one contains system data and the other
one contains user data... On my update routine (in C) I have to inc
Amalgamation fails to compile when -DSQLITE_OMIT_VIEW is defined.
./sqliteSrc/sqlite-3.5.5/sqlite3.c: In function 'sqlite3Insert':
../sqliteSrc/sqlite-3.5.5/sqlite3.c:55512: error: syntax error before numeric
constant
../sqliteSrc/sqlite-3.5.5/sqlite3.c:55543: error: invalid lvalue in assignment
Gilles wrote:
> At 22:47 04/02/2008 +1100, John Machin wrote:
>> Well, obviously(?) you are closer to success with "\t" than with '\t'.
>> You probably have an extra unseen TAB. It won't like that NULL.
>
> Thanks, but no matter what I try, it doesn't work:
> - just two columns, assuming it will
DRH,
I guess, the question being asked is twofold.
Should there be an error returned at all ? Or if there is an error,
wouldn't SQLITE_BUSY be more appropriate... So the users app could attempt a
retry?
Since there is an error, it seems that the error message is not the same as
Ok, simple fix... Updated to MySQL_python-1.2.2 and all ok now! :D
- Original Message -
From: Andy Smith
To: sqlite-users@sqlite.org
Sent: Monday, February 04, 2008 3:52 PM
Subject: Pysqlite issue no attribute 'autocommit'
Hi there,
Im trying to run a Python based pro
At 22:47 04/02/2008 +1100, John Machin wrote:
>Well, obviously(?) you are closer to success with "\t" than with '\t'.
>You probably have an extra unseen TAB. It won't like that NULL.
Thanks, but no matter what I try, it doesn't work:
- just two columns, assuming it will just increment the primar
ìì ìê° sqlite-users@sqlite.org ë¡ë¶í° ì¤ë ë©ì¼ì ìì ì ê±°ë¶íììµëë¤.
_
--- Begin Message ---
sqlite-users@sqlite.org wrote:
> Hi all,
>
> Hopefully you can help, while running sqlite version 3.5.5
>
> Two seperate thr
sqlite-users@sqlite.org wrote:
> Hi all,
>
> Hopefully you can help, while running sqlite version 3.5.5
>
> Two seperate threads each attempt to run a vacuum command against the same
> db. Each thread has an independent connnection to the db.
>
> One thread succeeds and the other gets a retu
ìì ìê° sqlite-users@sqlite.org ë¡ë¶í° ì¤ë ë©ì¼ì ìì ì ê±°ë¶íììµëë¤.
_
--- Begin Message ---
Hi all,
Hopefully you can help, while running sqlite version 3.5.5
Two seperate threads each attempt to run a vacuum comman
Hi all,
Hopefully you can help, while running sqlite version 3.5.5
Two seperate threads each attempt to run a vacuum command against the same db.
Each thread has an independent connnection to the db.
One thread succeeds and the other gets a return code of 1 (SQLITE_ERROR) from
sqlite3_step
ìì ìê° sqlite-users@sqlite.org ë¡ë¶í° ì¤ë ë©ì¼ì ìì ì ê±°ë¶íììµëë¤.
_
--- Begin Message ---
Hi there,
Im trying to run a Python based program which uses MySQL with python-sqlite
and Im recieving this error,
'Connect
Hi there,
Im trying to run a Python based program which uses MySQL with python-sqlite
and Im recieving this error,
'Connection' object has no attribute 'autocommit'
I´ve had a google for this and its seems like it may be a bug python-sqlite or
sqlite bug , but also I tried searching
for it
Gilles wrote:
> At 02:27 04/02/2008 +0100, Gilles wrote:
>
>> Thanks for the tip, but I tried that too, with no success:
>>
>
> I tried both:
>
> sqlite> .separator "\t"
> sqlite> .import test.csv customer
> test.csv line 1: expected 3 columns of data but found 4
>
> sqlite> .separator '\t'
On Mon, 04 Feb 2008 10:46:53 +0100, Gilles
<[EMAIL PROTECTED]> wrote:
>Hello
>
> I'd like to display the column names as headers in an HTML table.
>
> 1. I need to retrieve the column names, but the following doesn't work:
>
> # cat cols.php
> $dbh = new
> PDO("sqlite:db.sqlite");
>
>
It is safe to define SQLITE_ENABLE_LOCKING_STYLE=1 with sqlite 3.5.5
if I am interested in opening database files on a shared volumes on Mac?
As far as I know it was the only workaround ... or something is
changed in recent versions?
Thanks.
---
Marco Bambini
http://www.sqlabs.net
http://www.s
Hello
I'd like to display the column names as headers in an HTML table.
1. I need to retrieve the column names, but the following doesn't work:
# cat cols.php
exec($sql);
$sql = "SELECT * FROM customer";
$row = $dbh->query($sql)->fetch();
foreach ($row as $col) {
57 matches
Mail list logo