Re: [sqlite] GUI ?
At 20:53 15/10/2004, Richard wrote: wondering if there are any Mac OS X GUI front-end apps, that will work with SQlite ? We now have a SQLite driver for our project Rekall. Unfortunately, it only supports SQLite V2.8.15, but we are working on a V3.0.x. BTW the Mac OS X build of Rekall will be released in the week or so Thanks - Richard --- Regards John Dean, co-author of Rekall, the only alternative to MS Access
Re: [sqlite] SQLite for Windows CE
I am also interested in synchronizing SQLite databases. As far as I am aware, there is no support in the SQLite code for the tasks required to synchronize multiple databases. You would need meta-data indicating whether data has been added/deleted/modified along with either timestamps or update numbering in order to reconcile the changes and possibly conflicts between multiple databases. You might want to google for the techniques employed in synchronizing PalmOS PDB files between the PDA and host. It provides table based synchronization, and seems to be a robust and efficient solution between a pair of databases. John Oliva > Does anyone know how to synchronize the data on the WinCE device with a > database on a server computer? I'm just testing the feasibility of using > SQLite for our projects that run under wireless WinCE 3.0 device. The > primary database is a Sybase database server running on Sun workstations. > The WinCE SQLite would be a subset of the Sybase database. My conceptual > problem is if we do that, how could we keep the two databases > synchronized? > The wireless computers will not always be within radio frequency (RF) of > the > database, so a large part of its work is off-line from the main Sybase > server. > > Thanks for any hints or links you may be able to provide. > > Mel Stober >
[sqlite] SQLite for Windows CE
Does anyone know how to synchronize the data on the WinCE device with a database on a server computer? I'm just testing the feasibility of using SQLite for our projects that run under wireless WinCE 3.0 device. The primary database is a Sybase database server running on Sun workstations. The WinCE SQLite would be a subset of the Sybase database. My conceptual problem is if we do that, how could we keep the two databases synchronized? The wireless computers will not always be within radio frequency (RF) of the database, so a large part of its work is off-line from the main Sybase server. Thanks for any hints or links you may be able to provide. Mel Stober
[sqlite] GUI ?
wondering if there are any Mac OS X GUI front-end apps, that will work with SQlite ? Thanks - Richard
[sqlite] GUI ?
wondering if there are any Mac OS X GUI front-end apps, that will work with SQlite ? Thanks - Richard
Re: [sqlite] minor problems with 3.08 source package
The configure script makes .libs/libsqlite3.a for me, without arguments or fiddling. I use ../sqlite/configure --enable-threadsafe to build the threadsafe, no tcl, and as a static lib version. Can you tell me what fiddling you did to "fix" it? Ok, color me embarassed. I rebuild again from scratch and watched the build process a little more carefully. You're right, it does indeed build libsqlite3.a, but it places the file into ".libs" which is not a convention I have ever encountered before. Since I didn't run "make install" and was just looking to copy libsqlite3.a into another project directory, I didn't see it. I think my comments about Makefile.linux-gcc still stand -- it needs a commented option for NO_TCL, and it needs to have "-static" removed from the LIBREADLINE line. When I said "this required fiddling as the configure script did not..." I was being imprecise. I did not "fix" the configure script, I had to "fiddle" (or so I thought) to get a static library. Thanks for the prompt response. -Eli
Re: [sqlite] BLOBs and sqlite_exec
On Oct 15, 2004, at 9:43 AM, john mcnicholas wrote: Sorry, I couldn't be of more help but perhaps this will lead you in the right direction. Actually, this is extremely helpful. I should have realized that I could use the binding interface to bind blob data to a SQL statement. I'll play with that and let you know if it works. Thanks.
RE: [sqlite] BLOBs and sqlite_exec
Sorry, but I can't give you a definitive answer myself since I working on the same problem. I'll let you know when/if I solve it and I'm sure you'll do the same. But for what its worth below is what i'm trying in C++. first the disclaimer - i'm very new to sqlite and its been a while since i've done sql/odbc type of work. SHORT ANSWER: i agree you don't use sqlite_exec. i'm pretty sure you need to use the sqlite3_bind_blob call with a prepared sqlite3_statement. LONG ANSWER: this is what i think you're supposed to do, but it isn't working yet. GOAL: Briefly, the goal is to add a blob field (here for a newly created record, as opposed to updating) 0. assume a table was created with 3 fields. "create table xtable (id primary integer, stuff as blob, type as integer);" 1. create a sqlite3_stmt via the prepare call. const char *sql = "INSERT INTO xtable (id, stuff, type) VALUES (NULL,?,?)"; rc = sqlite3_prepare( sql, &pstmt, ); 2. then bind the columns using an index to represent each '?' field. Notes: a. since the id is "autoincrement"; (i.e. autoassigned) that field was not bound b. use INDEX #1 for the first ? (the blob) sql_bind_blob( pstmt, 1, pData, nSizeOfData, .. ); // use appropriate flag here c. use INDEX #2 for the type sql_bind_int( pstmt, 2, nTypeValue ); d. unless i'm mistaken the calls to read the values from a query are 0 based and these are 1 based. perhaps i'm wrong. e. be sure to check all return codes! 3. then execute the statement via sqlite3_step(pstmt); 4. close/free the statement. RESULT: the record was added, the type value is correct, but the blob data is corrupt. Note: i have additional code to read the object that verified the type, was correct, but the blob is wrong. Yes the error could be in my "read from db" code... Note: In addition when trying to read that column after a query it states the blob data type is TEXT as opposed to BLOB. I'm not sure why that is the case. Sorry, I couldn't be of more help but perhaps this will lead you in the right direction. John -Original Message- From: Will Leshner [mailto:[EMAIL PROTECTED] Sent: Friday, October 15, 2004 11:05 AM To: [EMAIL PROTECTED] Subject: Re: [sqlite] BLOBs and sqlite_exec On Oct 15, 2004, at 7:50 AM, Will Leshner wrote: > Sorry if this is terribly obvious, but I'm assuming that, in SQLite3, > we can't use the sqlite_exec convenience API to store BLOBs, right? I > see that if we go through the VM directly the API allows us to specify > a data size, so that it doesn't depend on NULL-terminated C strings. > But sqlite_exec does no such thing, right? > > > Sorry to respond my own question, but I'm digging into the SQLite3 code a bit more and I'm a little confused. I see that sqlite3_prepare takes a SQL statement as a char* and also the number of bytes in the SQL statement. I assumed this was so that you could put BLOB data in the SQL statement. But sqlite3_prepare doesn't seem to actually use the nBytes parameter anywhere. And sqlite3RunParser seems to be running the parse until it finds a NULL byte in the zSql string. In fact, sqlite3RunParser doesn't even take a number of bytes for the SQL string, so I don't see how it could be using that for the length of the string at all. So I guess my question is: How do you put BLOB (binary) data into a SQLite3 database?
Re: [sqlite] minor problems with 3.08 source package
Friday, October 15, 2004, 11:31:42 AM, Eli wrote: > I may be in a minority here, but I needed to build sqlite3: threadsafe, > no tcl, and as a static lib. > With both 3.06 and 3.08, this required fiddling as the configure script > does not create libsqlite3.a. The configure script makes .libs/libsqlite3.a for me, without arguments or fiddling. I use ../sqlite/configure --enable-threadsafe to build the threadsafe, no tcl, and as a static lib version. Can you tell me what fiddling you did to "fix" it? e
[sqlite] minor problems with 3.08 source package
I may be in a minority here, but I needed to build sqlite3: threadsafe, no tcl, and as a static lib. With both 3.06 and 3.08, this required fiddling as the configure script does not create libsqlite3.a. configure --help does report: --enable-static[=PKGS] build static libraries [default=yes] But it is neither enabled by default, nor does it work if you do enable it. So that leaves Makefile.linux-gcc. No problem, but there is no commented option to turn on NO_TCL. Also, the libraries line for LIBREADLINE includes the option -static, which causes bitter warnings from gcc about all of the *pwent access routines. (eg : /usr/lib/gcc-lib/i386-redhat-linux/3.3.3/../../../libreadline.a(complete.o)(.text+0x1c71): In function `rl_username_completion_function': : warning: Using 'getpwent' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking) For future updates, can Makefile.linux-gcc be amended with an option for NO_TCL and can -static be removed from LIBREADLINE? Or even better, can the configure script be fixed to generate a static lib? -Eli
Re: [sqlite] BLOBs and sqlite_exec
On Oct 15, 2004, at 7:50 AM, Will Leshner wrote: Sorry if this is terribly obvious, but I'm assuming that, in SQLite3, we can't use the sqlite_exec convenience API to store BLOBs, right? I see that if we go through the VM directly the API allows us to specify a data size, so that it doesn't depend on NULL-terminated C strings. But sqlite_exec does no such thing, right? Sorry to respond my own question, but I'm digging into the SQLite3 code a bit more and I'm a little confused. I see that sqlite3_prepare takes a SQL statement as a char* and also the number of bytes in the SQL statement. I assumed this was so that you could put BLOB data in the SQL statement. But sqlite3_prepare doesn't seem to actually use the nBytes parameter anywhere. And sqlite3RunParser seems to be running the parse until it finds a NULL byte in the zSql string. In fact, sqlite3RunParser doesn't even take a number of bytes for the SQL string, so I don't see how it could be using that for the length of the string at all. So I guess my question is: How do you put BLOB (binary) data into a SQLite3 database?
[sqlite] BLOBs and sqlite_exec
Sorry if this is terribly obvious, but I'm assuming that, in SQLite3, we can't use the sqlite_exec convenience API to store BLOBs, right? I see that if we go through the VM directly the API allows us to specify a data size, so that it doesn't depend on NULL-terminated C strings. But sqlite_exec does no such thing, right?
[sqlite] multiple indexes.
Hello, I'd like to know if the management of multiple indexes on select statement is in the TODO list of SQLite? On joined request, this lack is a real performance killer. Example: select t1.id,t2.name from t1,t2 where t1.id IN(a00,b00, ,z99) and t1.t2id = t2.id; For now, SQLite use by default the wrong index and make a full join ignoring the 'IN' restriction. I need to force the index selection like this to gain a little speed: select t1.id,t2.name from t1,t2 where t1.id IN(a00,b00, ,z99) and +t1.t2id = t2.id; Once rows from t1 are selected (fast with the forced index), SQLite does not use the t2 index on 'id' to speed up the join. In my case, t2 is quite big. The only "solution" i see could be to split the request in two to use indexes on both tables... Can anyone advise me? Thanks. Bye, -- Guillaume FOUGNIES
Re: [sqlite] Support for ODBC?
R S wrote: Can an application access data from SQLite via ODBC? Didn't see documentation on the same. If you have an ODBC driver for SQLite, yes. The "SQLite Wrappers" page of the wiki mentions "ODBC driver for SQLite. http://www.ch-werner.de/sqliteodbc/";. I don't know anything about it, but check out the URL.