[sqlite] Exporting MS Access MDB into SQLite
SQLite Users, I started to export an Access MDB file into a DB file that was created with SQLite. I was using the Visual Basic, Visual Data Manager tool to export tables to the SQLite DB using the SQLite ODBC driver. The first table went OK. All other tables after that came up with the following error: VisData The following Error occurred OBDC-call failed Number 3146 If I create a new DB in SQLite, I am able to export one table without a problem. It doesn't seem to matter which table it is. Please review and advise of any possible solutions. Thanks, Ray Borror
RE: [sqlite] RegEx w/ sqlite, yet?
If you are working with delphi, I could have a solution for you. > -Original Message- > From: Jay [mailto:[EMAIL PROTECTED] > Sent: Saturday, March 26, 2005 3:41 AM > To: sqlite-users@sqlite.org; Win a 2 > Subject: Re: [sqlite] RegEx w/ sqlite, yet? > > > > Hello sqlite-users, > > > > any news on that? > > It's not part of the sql standard, so I would bet the answer > is going to be 'you have to add that yourself'. I did for my project. > > __ > Do You Yahoo!? > Tired of spam? Yahoo! Mail has the best spam protection > around http://mail.yahoo.com > > >
[sqlite] Strange select performance
Hi, I have a simple table like CREATE TABLE RecipeIngredients ( id integer primary key, recipeid integer(10), unitId integer(10), ... ); With an index on recipeid and unitid (foreign keys) In the table there are 11 rows where recipeid is "558134" and 243042 rows where the unitid is "3" from totally 5.4 mill. rows. If I do a select recipeid, unitid from RecipeIngredients where recipeid = 558134 and unitid = 3 it takes about 80 seconds. If I change the order in the expression to select recipeid, unitid from RecipeIngredients where unitid = 3 and recipeid = 558134 it also takes about 80 seconds. But if I do select recipeid, unitid from RecipeIngredients where unitid > 3 and recipeid = 558134 It takes less than 1 second. I tried to do a "explain" and can see that there are a difference in the way it is looping through data, but don't really understand why. Any one has a good explanation? Frank Tolstrup
Re: [sqlite] Comiling static libraries on Win32
Eugene Wee wrote: Hi, Just a guess here, but wouldnt the idea then be to (manually) compile each source file, then link the object files with your own? That idea would -mostly- work, and I would hope that I have enough mental capacity to drop out the tcl bindings, dll-specific functions and the sqlite3 command line utility functions. I was just hoping that there was a Makefile somewhere that would simplify the task for me. I'd like to propose a question to the list in general. I've noticed when running with the Windows DLL that some queries aren't returning the expected results. In particular I'm having trouble with this query: SELECT * FROM author WHERE name=:name AND password=:password On UNIX, with the SQlite3 command line client on Windows, and with SQLite3Explorer I always get the expected one record (since my schema indicates that this combination of parameters will be unique). Unfortunately when I use a client based on the Windows DLL I get an empty result set. :password is always bound to a printable version of the md5 hash of the password, and I've checked to make sure that this hash is exactly matching the hash as stored in the database, since a problem with the Windows implementation of the hash was my first suspect. Has anybody else experienced problems like this? Part of my interest in composing a static library is that I suspect that it will be a better match for my build system (gcc 3.4), which might reduce some problems. Clay Dowling
Re: [sqlite] Prepared Statement Interface
Hi, The delimiter thing isn't relevant with the prepared statements interface. The bound parameter is known to be a data item, not an SQL delimiter like the SQL quote character ('). Yeah, I tried to do some SQL injection, and it didnt work :) You should be safe using strlen rather than subtracting 1 from it. strlen() returns the number of characters in a string, not including the terminating NULL. That's what sqlite3_prepare() is expecting. Actually, the part about -1 would be from the docs: "If the next argument, "nBytes", is less than zero, then zSql is read up to the first nul terminator." Wouldnt it be simpler to just use -1 (or some other negative integer) instead of sizeof() or strlen() then (for sqlite3_prepare(), at least)? I'm glad that my article was of some use to you in using the sqlite_prepare() interface. Yep, thanks for writing it, Clay. Eugene Wee
Re: [sqlite] Comiling static libraries on Win32
Hi, Just a guess here, but wouldnt the idea then be to (manually) compile each source file, then link the object files with your own? With MinGW/GCC I used dlltool to get obtain libsqlite3.a from sqlite3.dll and sqlite3.def, passing the -lsqlite3 parameter to GCC at link-time. The only file I actually used from the source was sqlite3.h I have no idea how standard my method is, though. Eugene Wee Clay Dowling wrote: I highly suspect that I'm being a dolt here, but I'm not seeing the obvious thing. I downloaded the preprocessed Win32 source code in hopes of compiling a static library for a Win32 release of a project that I'm working on. Unfortunately I couldn't find a makefile in the preprocessed .zip file. What's necessary to compile a static library, assuming that I don't have the cygwin or msys packages installed that could (potentially) run the configure program. I noticed that SQLiteExplorer has a static link rather than using the DLL. Would anybody care to share their trick with this poor benighted soul? I've got the 3.2.0 source. Clay Dowling
[sqlite] Comiling static libraries on Win32
I highly suspect that I'm being a dolt here, but I'm not seeing the obvious thing. I downloaded the preprocessed Win32 source code in hopes of compiling a static library for a Win32 release of a project that I'm working on. Unfortunately I couldn't find a makefile in the preprocessed .zip file. What's necessary to compile a static library, assuming that I don't have the cygwin or msys packages installed that could (potentially) run the configure program. I noticed that SQLiteExplorer has a static link rather than using the DLL. Would anybody care to share their trick with this poor benighted soul? I've got the 3.2.0 source. Clay Dowling -- http://www.lazarusid.com/notes/ Lazarus Notes Articles and Commentary on Web Development
Re: [sqlite] Prepared Statement Interface
Eugene Wee wrote: But I'm still curious as to the delimiter thing, hope someone can clarify. Oh, and also, does sqlite3_prepare() ask for the length of the statement string in bytes including the null terminator, or excluding it? Or is it safe to use -1 most of the time? The delimiter thing isn't relevant with the prepared statements interface. The bound parameter is known to be a data item, not an SQL delimiter like the SQL quote character ('). You should be safe using strlen rather than subtracting 1 from it. strlen() returns the number of characters in a string, not including the terminating NULL. That's what sqlite3_prepare() is expecting. I'm glad that my article was of some use to you in using the sqlite_prepare() interface. Clay Dowling -- http://www.lazarusid.com/notes/ Lazarus Notes Articles and Commentary on Web Development