Re: [sqlite] WinCE port
Nuno, Is this port freely available? I presume you can use it to build the textfixture for running on the PPC target. Thanks, John Oliva > Stober, Mel, dando pulos de alegria, escreveu : >> I created an MFC for WinCE version of shell.c to make it easier to enter >> text and see error messages. The problem I have is that insert SQL >> statement doesn't seem to work. Using the examples from here: >> http://bs2000.fujitsu-siemens.com/download/Goodies/SMAWPlus/SMAWPsqli/html/s >> qlite.1.html it doesn't like the exalamation point inside quoted >> strings. > > I advise you to check your code as the example is pretty common. > > As an aside, Paul Sokolovsky succeeded in porting TCL 8.4.6 into an iPaq > 4150, using an arm-wince-gcc port. > > With that it achieved running the full test suite on sqlite 2.8.13 and > all relevant single-threaded tests passed. > > I'm very grateful to him as I'm more confident now on the status of the > port :) > > This unfortunely doesn't apply to 3.0.x, but I think it's a good sign :) > > Best regards, > ~Nuno Lucas > > >
RE: [sqlite] still having problems with DBD::SQLite2
At 2:21 PM -0500 10/9/04, Freeman, Michael wrote: Well in my discovery, it seems sqlite is just a flat file and cannot be updated by multiple processes/threads/whatever at the same time. You can do selects, but not anything that modifies it. My problem was that I was working in a "threaded" environment where I had multiple threads trying to do inserts at the same time, and that wasn't working out for me. I'd like to work on the DBD::Sqlite2 code sometime when I have time to try and improve its error reporting and extend some of its capabilities. Look for patches to come. Also, on that note, might as well make a DBD::SQLite3. -Mike There is already a DBD for SQLite 3; it is called "DBD::SQLite", with no numerical suffix. The newest release is v1.06, which embeds SQLite 3.0.7. By contrast, DBD::SQLite2 v0.32 embeds SQLite 2.8.15. I strongly suggest that you focus all new development on SQLite 3 (unless you have a pile of legacy v2 data files) since that's where it will benefit the community (and yourself) best. -- Darren Duncan
RE: [sqlite] still having problems with DBD::SQLite2
Le sam 09/10/2004 à 21:21, Freeman, Michael a écrit : > Look for patches to come. Also, on that note, might as well make a > DBD::SQLite3. Another DBD for sqlite 3, then ? Looks like there will be plenty to choose from ;-) -- ** [EMAIL PROTECTED] OpenPGP pubkey: http://www.amakuru.net/dmorel.asc signature.asc Description: Ceci est une partie de message =?ISO-8859-1?Q?num=E9riquement?= =?ISO-8859-1?Q?_sign=E9e=2E?=
RE: [sqlite] still having problems with DBD::SQLite2
Well in my discovery, it seems sqlite is just a flat file and cannot be updated by multiple processes/threads/whatever at the same time. You can do selects, but not anything that modifies it. My problem was that I was working in a "threaded" environment where I had multiple threads trying to do inserts at the same time, and that wasn't working out for me. I'd like to work on the DBD::Sqlite2 code sometime when I have time to try and improve its error reporting and extend some of its capabilities. Look for patches to come. Also, on that note, might as well make a DBD::SQLite3. -Mike -Original Message- From: Keith Herold [mailto:[EMAIL PROTECTED] Sent: Friday, October 08, 2004 6:48 PM To: [EMAIL PROTECTED] Subject: RE: [sqlite] still having problems with DBD::SQLite2 Well, you can always synchronize access and share the same pointer, right (in windows; using fork in unix is bad, presumably because fork() just copies all the data into the child)? It sucks if you are using sql_step, or, I imagine, precompiled queries, though. --Keith ** - I'm not a professional; I just get paid to do this. - Things I've learned about multithreaded programming: 123... PPArrvooottieedcc ttm ueelvvteeirrtyyhtt rhheiianndgge dwi hnpi rctohhg eri aslm omscitanalgt iowcbh,je engceltvo ebwrah lip,co hso srci abonlt ehb .ee^Nr waicscee snsoetd 'aotb jtehcet -slaomcea lt'il m^Ne from two or more threads ** -Original Message- From: Darren Duncan [mailto:[EMAIL PROTECTED] Sent: Friday, October 08, 2004 4:23 PM To: [EMAIL PROTECTED] Subject: RE: [sqlite] still having problems with DBD::SQLite2 At 4:28 PM -0500 10/8/04, Freeman, Michael wrote: >I am pretty sure I know whats going on now. I am using POE (Perl Object >environment, I highly recommend it poe.perl.org) and what is happening >is my program is basically trying to do inserts into the database at >the same time, which I think is creating a deadlock. It can handle >doing one insert at one time, but when I fire a lot of events at it >that are kind of happening asynchronously on the server, it fails. It >would be nice if the debugging and logging output made some sort of >damn sense or would tell you these things.. I think I have had my head >up my ass all day cuz of this. I am going to try do some stuff in my >program that will "pause" all the other helper "threads" when I'm doing >a sql insert. Make sure that each thread has its own database connection via its own DBI->connect(), assuming that DBI isn't pooling and reusing the connections behind your back. This is analagous to C programs having a separate sqlite open() in each thread, which is necessary. -- Darren Duncan
Re: [sqlite] Sqlite explorer
D. Richard Hipp wrote: mike cariotoglou wrote: > if DRH can provide the upload space, I could make them public, free of charge > of course. > I've added generic file sharing space on the sqlite website. http://www.sqlite.org/tsc/contrib Correction: http://www.sqlite.org/contrib The "/tsc" subdirectory has now been omitted. You will need a user-id and password to upload. Contact me by private email to get one. -- D. Richard Hipp -- [EMAIL PROTECTED] -- 704.948.4565
Re: [sqlite] Sqlite explorer
mike cariotoglou wrote: > if DRH can provide the upload space, I could make them public, free of charge > of course. > I've added generic file sharing space on the sqlite website. http://www.sqlite.org/tsc/contrib You will need a user-id and password to upload. Contact me by private email to get one. -- D. Richard Hipp -- [EMAIL PROTECTED] -- 704.948.4565
[sqlite] WinCE Sqlite 3.0.7 config file missing alot of stuff that is contained in 2.8.15
The config.h file for WinCE version sqlite 3.0.7 downloaded from sourceforge http://sourceforge.net/project/showfiles.php?group_id=88393&package_id=125382&release_id=271513 is very different from the config.h for version 2.8.15. The 3.0.7 version does not contain structures, define statements, inline functions, and source forth as is contained in the config.h file for version 2.8.15. Is this an error? Version 2.8.15 for WinCE implements database locks, does this version 3.0.7 also implement datalocks? Is there a newer version 3.0.7 of WinCE source code with fixes available for download? The version 3.0.7 I downloaded from sourceforge does not compile fully either. Thanks Steve config.h version 2.8.15 /* * I don't know of any WinCE platform that isn't 32 bits. * Redefine this if that is the case, and a patch to the sqlite-wince * project on SourceFourge would be great. */ #define SQLITE_PTR_SZ 4 /* * Define this to omit authorization code */ // #define SQLITE_OMIT_AUTHORIZATION 1 / ** TODO: Add more SQLITE_OMIT_* things here (as comments) / /* * Define this to omit file locking code. * * Only use this if you are sure you will never access a database * simultaneously from two processes. * For a database that is only used by a single instance of your * application (beware for multiple instances!), it is safe (and * faster) to omit this feature. * This is forced on for Windows CE versions prior than 3.0 (see below) */ // #define SQLITE_WCE_OMIT_FILELOCK 1 /** * * WinCE fixes... * */ #include /* * Eliminate some warnings in the SQLite code. * (This should be addressed in the SQLite source - TODO) */ //C4018: '_' : signed/unsigned mismatch //C4244: '_' : conversion from '_' to '_', possible loss of data //C4267: '_' : conversion from '_' to '_', possible loss of data (MSVC 7.1 ?) //C4761: integral size mismatch in argument; conversion supplied #pragma warning ( disable : 4018 4244 4267 4761 ) /* * This is defined on and redefined on 'vdbe.c', so undefine it */ #undef VERIFY /* * WinCE platform configuration * * On versions prior than 3.0, a lot of workarounds are needed. * For start, no isalpha(),isdigit(),etc. functions/macros are implemented * (only the Unicode versions, like iswalpha). The same happens to atof(). * Another quirk is that the free() function has a diferent declaration * from the "normal" one, so it can't be used in pointer to function in * the same way (like it is used in 'tokenize.c'). * The last workaround is for the getenv() function, as there is no * environment for WinCE. */ #if defined(_WIN32_WCE) && _WIN32_WCE < 300 # define SQLITE_WCE_USE_OWN_IS1 # define SQLITE_WCE_USE_OWN_ATOF 1 # define SQLITE_WCE_FREE_HACK 1 # define SQLITE_WCE_STRCMP_HACK 1 #else # define SQLITE_WCE_USE_OWN_IS0 # define SQLITE_WCE_USE_OWN_ATOF 0 # define SQLITE_WCE_FREE_HACK 0 # define SQLITE_WCE_STRCMP_HACK 0 #endif #if defined(_WIN32_WCE) # define FILENAME_MAX 256 # define SQLITE_WCE_USE_OWN_GETENV1 #else # define SQLITE_WCE_USE_OWN_GETENV0 #endif /* * In WinCE versions prior than 3.0 no file locking is performed. * If you are developing on this platforms, make sure to only use * SQLite on a single threaded project, and that only a process at a * time is accessing the database. * * You can also define this if you don't want any file locking. * This will speed up things a litle, but can only be used if you are * sure it will never be two processes accessing the same database at * the same time. */ #if defined(_WIN32_WCE) && _WIN32_WCE < 300 && !defined(SQLITE_WCE_OMIT_FILELOCK) # define SQLITE_WCE_OMIT_FILELOCK #endif /* * No ANSI equivalents to isXXX routines. * Use the UNICODE version. */ #if SQLITE_WCE_USE_OWN_IS # define isalpha iswalpha # define isalnum iswalnum # define isdigit iswdigit # define isspace iswspace # define isprint iswprint # define islower iswlower # define isupper iswupper #endif /* * Quick hack for free() -- function attributes error in tokenize.c */ #if SQLITE_WCE_FREE_HACK __inline void sqlitewce_free( void *p ){ free(p); } # define free sqlitewce_free #endif /* * Quick hack for strcmp() -- function attributes error in tokenize.c */ #if SQLITE_WCE_STRCMP_HACK __inline int sqlitewce_strcmp( const char* s1, const char* s2 ){ return strcmp(s1,s2); } # define strcmp sqlitewce_strcmp #endif /* * No atof(), use our own */ #if SQLITE_WCE_USE_OWN_ATOF double wince_atof( const char* s ); # define atof wince_atof #endif /* * No getenv(), simulate that no variables are defined */ #if SQLITE_WCE_USE_OWN_GETENV # define getenv(x)NULL #endif config.h version 3.0.7 #define SQLITE_PTR_SZ 4 #ifdef _MSC_VER /* ** Eliminate some Level 3 warnings for Microsoft compilers ** ** C4018: '_' : signed/unsigned mismatch ** C4244: '_' : conversi
[sqlite] Any WINCE sqlite 3.0.7source code tha t implement database locks available for download.
Does anyone have or know where I can download WINCE sqlite 3.0.7 source code that implement database locks. Steve Frierdich
[sqlite] WinCE sqlite version 3.0.7 source code with fixes available?
Does anyone have WinCE sqlite version 3.0.7 source that has fixes and has been tested on WinCE and works available for download? I downloaded some WinCE source from a website but there were bugs in it when I compiled the source code. The bugs were minor and simple to fix, but they were bugs that one would never expect to appear such as: Expected constants not defined, illegal zero size array. C:\EMIRSS\Software\SQLite\SQLite3_0_7Wince\src\shell.c(230) : error C2065: 'FILENAME_MAX' : undeclared identifier C:\EMIRSS\Software\SQLite\SQLite3_0_7Wince\src\shell.c(230) : error C2057: expected constant expression C:\EMIRSS\Software\SQLite\SQLite3_0_7Wince\src\shell.c(231) : error C2229: struct 'callback_data' has an illegal zero-sized array Just wondering if anyone has updated source code for WinCE sqlite version 3.0.7 source that has fixes and available for download? I like to thanks everyone for his or her input. I belong to about 5 news groups, and read hundreds of emails every day from all five newsgroups, and sqlite has the most rapid response and informative emails. Steve Frierdich Nuno Lucas wrote: Stober, Mel, dando pulos de alegria, escreveu : I created an MFC for WinCE version of shell.c to make it easier to enter text and see error messages. The problem I have is that insert SQL statement doesn't seem to work. Using the examples from here: http://bs2000.fujitsu-siemens.com/download/Goodies/SMAWPlus/SMAWPsqli/html/s qlite.1.html it doesn't like the exalamation point inside quoted strings. I advise you to check your code as the example is pretty common. As an aside, Paul Sokolovsky succeeded in porting TCL 8.4.6 into an iPaq 4150, using an arm-wince-gcc port. With that it achieved running the full test suite on sqlite 2.8.13 and all relevant single-threaded tests passed. I'm very grateful to him as I'm more confident now on the status of the port :) This unfortunely doesn't apply to 3.0.x, but I think it's a good sign :) Best regards, ~Nuno Lucas
Re: [sqlite] Help with query
Fred, A query I can understand! This was my attempt, and worked to some degree, but yours is more workable and, I feel, more accurate "select NewsData.Postcode,NewsData.Address1,Agents.Code,Agents.Shopname,Agents.Addre ss1.Agents.Price from NewsData join Agents on NewsData.Postcode where NewsData.Shop1>'' or NewsData.Shop2>'' order by NewsData.Postcode asc" Thanks very much for your interest and help, Brian