Re: [sqlite] sqlite as server queries

2007-08-06 Thread Gilles Ganault
At 14:08 06/08/2007 +0100, "Edwin Eyan Moragas" wrote: 2) anybody ever implemented something like a single process of sqlite doing queries for a lot of networked clients? Am working on this, in Classic VB5: Winsock control on the server, Inet control on the client, the client thinks it's

[sqlite] Help Creating database????

2007-08-06 Thread kishora . subramanyajois
Hi, I have sqlite3.exe When I execute it, the following prompt will be displayed sqlite> I would like to know how to create a database? I tried, sqlite>sqlite3 test.db ...>^Z It is not creating. I am getting an error like

Re: [sqlite] sqlite as server queries

2007-08-06 Thread Edwin Eyan Moragas
On 8/6/07, John Stanton <[EMAIL PROTECTED]> wrote: > > > We use a single process server as an Sqlite server. It works well > because it obeys certain constraints: >o Transactions are always short >o It has many users and many Sqlite databases, but each database > does not have a large

Re: [sqlite] sqlite as server queries

2007-08-06 Thread Edwin Eyan Moragas
On 8/6/07, Christian Smith <[EMAIL PROTECTED]> wrote: > > 2) anybody ever implemented something like a single > > process of sqlite doing queries for a lot of networked > > clients? > > > A few people have implemented such a solution. It loses one of the > benefits of SQLite, however, in that

Re: [sqlite] QT4 ubuntu sqlite driver problem ? (was Re: [sqlite] Weird error)

2007-08-06 Thread Bill KING
Yeah, there are significant locking issues in sqlite under Qt, in particular if you hold a query open (either via QSqlQuery, or QSqlTableModel et al). clear() is your friend when things start going south. Also, another gotcha to watch out for, if the query fails, check the queries lastError(), not

Re: [sqlite] how to create C functions and refer to them in sql

2007-08-06 Thread drh
"Chase" <[EMAIL PROTECTED]> wrote: > okay, wait sorry wrong question. > > here's the deal. i want this trigger to fire -- and insert valid guids > into a table -- even outside the context of my app. > > using sqlite3_create_function(), i can create a sort of temporary > function that

Re: [sqlite] how to create C functions and refer to them in sql

2007-08-06 Thread Joe Wilson
--- Chase <[EMAIL PROTECTED]> wrote: > here's the deal. i want this trigger to fire -- and insert valid guids > into a table -- even outside the context of my app. > > using sqlite3_create_function(), i can create a sort of temporary > function that only works from with my app (or other

Re: [sqlite] FW: Security Problem C/C++

2007-08-06 Thread Trevor Talbot
On 8/6/07, Severin Müller <[EMAIL PROTECTED]> wrote: > I'm trying to use SQLite3 for my File, because I thinks it's a great API and > easy to use. But I'm having trouble to use the library properly. > When i run the Program, I get get the following Error: > Unhandled exception… so its some kind

RE: [sqlite] Security Problem C/C++

2007-08-06 Thread Lajos Baranyi
Dear Clay, Is there any way to request the digest form of the mailing list? I am flooded with e-mails, and it is too much form me to handle... Regars: layosh -Original Message- From: Clay Dowling [mailto:[EMAIL PROTECTED] Sent: Monday, August 06, 2007 4:27 PM To:

RE: [sqlite] Security Problem C/C++

2007-08-06 Thread Lee Crain
Severin, The "sqlite3_open( )" call is hard to break. Try breakpointing into the sqlite3 source code to see what the failure is. Lee Crain __ -Original Message- From: Severin Müller [mailto:[EMAIL PROTECTED] Sent: Monday, August 06, 2007 4:42 PM To:

Re: [sqlite] how to create C functions and refer to them in sql

2007-08-06 Thread Clark Christensen
I think you'd have to actually add your function into the SQLite source, and recompile. My guess, not being a C guy, would be for you to have a look at the SQLite source (maybe in func.c?). Since you already have a C function to do what you want, it seems pretty straightforward :-)) -Clark

RE: [sqlite] Security Problem C/C++

2007-08-06 Thread Severin Müller
Hey I don't even get to call the sqlite3_errmsg() function. My Program crashes with the call sqlite3_open(filename,); I'm been spending hours now, to figure out, what may cause that crap :) I really have no idea... -Original Message- From: Clay Dowling [mailto:[EMAIL PROTECTED] Sent:

Re: [sqlite] how to create C functions and refer to them in sql

2007-08-06 Thread Chase
okay, wait sorry wrong question. here's the deal. i want this trigger to fire -- and insert valid guids into a table -- even outside the context of my app. using sqlite3_create_function(), i can create a sort of temporary function that only works from with my app (or other running

Re: [sqlite] how to create C functions and refer to them in sql

2007-08-06 Thread Eugene Wee
You are probably looking for sqlite3_create_function: http://www.sqlite.org/capi3ref.html#sqlite3_create_function Regards, Eugene Wee Chase wrote: i need a trigger to create and insert a new guid into a table, but apparently there is no built-in function for creating guids in sqlite. i can

RE: [sqlite] Multiple fields update

2007-08-06 Thread RB Smissaert
Yes, thanks, I just found out. It can work without the WHERE clauses. RBS -Original Message- From: Gerry Snyder [mailto:[EMAIL PROTECTED] Sent: 06 August 2007 21:59 To: sqlite-users@sqlite.org Subject: Re: [sqlite] Multiple fields update RB Smissaert wrote: > I am sure this SQL used

Re: [sqlite] Multiple fields update

2007-08-06 Thread Gerry Snyder
RB Smissaert wrote: I am sure this SQL used to be fine with SQLite: update table1 set field1 = 0 where field1 = 2, field2 = 3 where field2 = 2 Now however I get a syntax error near , Has this changed? RBS Does the thread below ring a bell? Does it help? Gerry

[sqlite] how to create C functions and refer to them in sql

2007-08-06 Thread Chase
i need a trigger to create and insert a new guid into a table, but apparently there is no built-in function for creating guids in sqlite. i can create the guid in C using uuid_generate() and then uuid_unparse() to get it into a string format. but how can i call that c code from a trigger?

[sqlite] Multiple fields update

2007-08-06 Thread RB Smissaert
I am sure this SQL used to be fine with SQLite: update table1 set field1 = 0 where field1 = 2, field2 = 3 where field2 = 2 Now however I get a syntax error near , Has this changed? RBS - To unsubscribe, send email

Re: [sqlite] Security Problem C/C++

2007-08-06 Thread Clay Dowling
Check the result code of sqlite3_open and use the error message from sqlite3_errmsg as the message in your exception. Then you'll know what's wrong. Clay Severin Müller wrote: > Hi > > > > I’m trying to use SQLite3 for my File, but I’m having trouble to use the > library properly. > > > > I

[sqlite] Security Problem C/C++

2007-08-06 Thread Severin Müller
Hi I’m trying to use SQLite3 for my File, but I’m having trouble to use the library properly. I Have to following Code: void Nickserv::write_nickname(std::string nick,std::string pass,std::string email,User user) { #ifdef _WIN32 const char *filename = "db\\Nickserv.db";

[sqlite] FW: Security Problem C/C++

2007-08-06 Thread Severin Müller
Hello I’m trying to use SQLite3 for my File, because I thinks it’s a great API and easy to use. But I’m having trouble to use the library properly. I Have to following Code: void Nickserv::write_nickname(std::string nick,std::string pass,std::string email,User user) { #ifdef _WIN32

[sqlite] SQLite on the Micrium OS on an ARM9

2007-08-06 Thread Downey, Shawn
Does anyone have any experience compiling SQLite to run in the Micrium operating system on an ARM9 platform? http://www.micrium.com/ Thank you. Shawn M. Downey MPR Associates 10 Maxwell Drive, Suite 204 Clifton Park, New York 12065 518-831-7544 (work) 860-508-5015 (cell)

RE: [sqlite] a c++ newbie question

2007-08-06 Thread Downey, Shawn
Does anyone have any experience compiling SQLite to run in the Micrium operating system on an ARM9 platform? http://www.micrium.com/ Thank you. Shawn M. Downey MPR Associates 10 Maxwell Drive, Suite 204 Clifton Park, New York 12065 518-831-7544 (work) 860-508-5015 (cell)

Re: [sqlite] a c++ newbie question

2007-08-06 Thread Eugene Wee
How can I do the same with prepare statements ? Is it possible for me to prepare 10,000 in a loop and then surround them with BEGIN TRANSACTCION AND END TRANSACTION ? Yes. As an added benefit the preparation would mean that the SQL statement does not have to be parsed on each iteration of

Re: [sqlite] a c++ newbie question

2007-08-06 Thread Stephen Sutherland
Everyone has suggested the use of prepared statements. I was actually inserting ~10,000 records with great results using BEGIN TRANSACTION; and END TRANSACTION; I was making 1 big string of insert statements and executing them all at once. It was extremely fast. How can I do

Re: [sqlite] Re: Re: Re: Re: Re: Re: Re: How does SQLite choose the index?

2007-08-06 Thread bartsmissaert
Now you can take comparisons too far and then they won't be useful anymore. If you want I will explain the setup here and you will see. RBS > On 8/6/07, [EMAIL PROTECTED] > <[EMAIL PROTECTED]> wrote: >> Yes, sure if it fails you might get wet, but I would try the few planks >> I >> got and see

Re: [sqlite] Re: Re: Re: Re: Re: Re: Re: How does SQLite choose the index?

2007-08-06 Thread bartsmissaert
Very true, so I will give up on you then. RBS > You can lead a horse to water but you cannot make it drink. > > [EMAIL PROTECTED] wrote: >> Yes, sure if it fails you might get wet, but I would try the few planks >> I >> got and see which one fits best and not bother with a mathematical >>

Re: [sqlite] Re: Re: Re: Re: Re: Re: Re: How does SQLite choose the index?

2007-08-06 Thread Nuno Lucas
On 8/6/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > Yes, sure if it fails you might get wet, but I would try the few planks I > got and see which one fits best and not bother with a mathematical model. > All a bit academic as you don't know the situation > I am dealing with. Even in the

Re: [sqlite] Re: Re: Re: Re: Re: Re: Re: How does SQLite choose the index?

2007-08-06 Thread John Stanton
You can lead a horse to water but you cannot make it drink. [EMAIL PROTECTED] wrote: Yes, sure if it fails you might get wet, but I would try the few planks I got and see which one fits best and not bother with a mathematical model. All a bit academic as you don't know the situation I am

Re: [sqlite] [SQLite improve productivity]

2007-08-06 Thread John Stanton
Igor Mironchick wrote: Hi. How can I improve productivity of this code: a_messenger_t::data_buff_t --> std::deque< some_struct > // char * errors = 0; for(

Re: [sqlite] selecting check constraints

2007-08-06 Thread Chris Cole
Chris Cole wrote: Hello, I was wondering what would be an example sql command that would allow you to return the check constraints on a specific column in a database? Thanks, --Chris I've found that the .schema {table} command will list the checks being performed but I can't find a way

Re: [sqlite] Re: Re: Re: Re: Re: Re: Re: How does SQLite choose the index?

2007-08-06 Thread bartsmissaert
Yes, sure if it fails you might get wet, but I would try the few planks I got and see which one fits best and not bother with a mathematical model. All a bit academic as you don't know the situation I am dealing with. RBS > Absolutely. Big bridge or small bridge, if it fails you fall in the >

Re: [sqlite] sqlite as server queries

2007-08-06 Thread John Stanton
Edwin Eyan Moragas wrote: 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

Re: [sqlite] Re: Re: Re: Re: Re: Re: Re: How does SQLite choose the index?

2007-08-06 Thread John Stanton
Absolutely. Big bridge or small bridge, if it fails you fall in the water. It looks as if the bridge in Minneapolis failed because construction workers moved tons of repaving material onto part of it and overstressed that section. A few calculations could have saved the catastrophe. I saw

RE: [sqlite] Select, update on the row, and step leads to crash

2007-08-06 Thread Joe Wilson
Updates during a SELECT work fine once you correct these mistakes: You shouldn't be using SQLITE_STATIC as buf is temporary - use SQLITE_TRANSIENT instead. The two different ways you populate the table are different. If createUsingExec is 1, your are inserting strings beginning with 'name is

Re: [sqlite] Best Match Query

2007-08-06 Thread Jim Dodgen
or with a "like" operator sqlite> create table x (t); sqlite> insert into x values (442); sqlite> insert into x values (44); sqlite> insert into x values (4454); select * from x where 4429845 like t||"%" order by length(t) desc limit 1; 442 Quoting RaghavendraK 70574 <[EMAIL PROTECTED]>:

Re: [sqlite] [SQLite improve productivity]

2007-08-06 Thread Christian Smith
Igor Mironchick uttered: Thx, very helpfull reply. One more question: is it need to do "END" after "BEGIN" or enought "COMMIT"? You can use "COMMIT". Probably should do, as it is more descriptive about what is happening. Check the docs for transaction commands:

Re: [sqlite] sqlite as server queries

2007-08-06 Thread Christian Smith
Edwin Eyan Moragas uttered: 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

Re: [sqlite] Best Match Query

2007-08-06 Thread RaghavendraK 70574
Thanks . I found similar one in the mailing list archive. create table test (t text); insert into test values ('9'); insert into test values ('98'); insert into test values ('986'); insert into test values ('9867'); select * from test where '98555' like t || '%' order by t desc limit 1;

[sqlite] selecting check constraints

2007-08-06 Thread Chris Cole
Hello, I was wondering what would be an example sql command that would allow you to return the check constraints on a specific column in a database? Thanks, --Chris - To unsubscribe, send email to [EMAIL PROTECTED]

Re: [sqlite] Best Match Query

2007-08-06 Thread Simon Davies
Hi Ragha, C:\Joinerysoft\JMS\TestArea>sqlite3 tst.db SQLite version 3.4.0 Enter ".help" for instructions sqlite> sqlite> create table tst( c1 integer, c2 test ); sqlite> insert into tst values( 1, '44' ); sqlite> insert into tst values( 2, '442' ); sqlite> insert into tst values( 3, '4454' );

[sqlite] Best Match Query

2007-08-06 Thread RaghavendraK 70574
Hi, How to form the SQL query(in SQLite) for the following problem below table: 44 442 4454 Input String: 4429845 Expected output from SQL query: 442 regards ragha ** This email and its attachments

Re: [sqlite] a c++ newbie question

2007-08-06 Thread Bharath Booshan L
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 ; >

Re: [sqlite] a c++ newbie question

2007-08-06 Thread Eugene Wee
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

Re: [sqlite] a c++ newbie question

2007-08-06 Thread Trevor Talbot
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

[sqlite] a c++ newbie question

2007-08-06 Thread Stephen Sutherland
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