Re: [sqlite] Re: SQLite version 3 design question: '500'=500?
D. Richard Hipp wrote: George Ionescu wrote: However, wanting to test how the engine compares strings and numbers: SELECT 'match' WHERE '500' = 500; returns 'match'; also, the following statements return the same result: SELECT 'match' WHERE '500' = 500; SELECT 'match' WHERE '500' = 499 + 1; Who can tell me what other SQL database engines do with the following? Tested with Postgres V7.3.2: CREATE TABLE test1(a VARCHAR(100)); CREATE TABLE INSERT INTO test1 VALUES('501'); INSERT 24969 1 INSERT INTO test1 VALUES(' 502 '); INSERT 24970 1 SELECT * FROM test1 WHERE a=501; a - 501 (1 row) SELECT * FROM test1 WHERE a=502; a - (0 rows) SELECT * FROM test1 WHERE a<'502'; a - 501 502 (2 rows) Or how about this: CREATE TABLE test2(b INTEGER); CREATE TABLE INSERT INTO test2 VALUES(503); INSERT 24973 1 INSERT INTO test2 VALUES(504); INSERT 24974 1 SELECT * FROM test2 WHERE b='503'; b - 503 (1 row) SELECT * FROM test2 WHERE b>'503'; b - 504 (1 row) -- Daniel Lee Kruse Pursuant to U.S. code, title 47, Chapter 5, Subchapter II,Section 227, any and all unsolicited commercial E-mail sent,to this address is subject to a fee of $500.00 U.S. E-Mailing denotes, acceptance of these terms. Consult http://www.law.cornell.edu/uscode/47/227.html for details. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [sqlite] sqlite with Visual Basic
I use SQLite ODBC with ADO to access databases from VB. It works like a charm. http://www.ch-werner.de/sqliteodbc/ __ Raymond Irving Jérôme_VERITE <[EMAIL PROTECTED]> wrote: I use this wrapper and to simplify again the code, I created littles classes which are very simple and look like the DAO classes. It permits to transform Simply a VB application using DAO to SQLITE Jérôme -Message d'origine- De : Steve O'Hara [mailto:[EMAIL PROTECTED] Envoyé : vendredi 14 mai 2004 10:35 À : Jalil Vaidya; Carlos Garces; [EMAIL PROTECTED] Objet : RE: [sqlite] sqlite with Visual Basic Here's the SQLite wrapper for VB from the Yahoo groups Steve -Original Message- From: Jalil Vaidya [mailto:[EMAIL PROTECTED] Sent: 14 May 2004 02:13 To: Carlos Garces; [EMAIL PROTECTED] Subject: Re: [sqlite] sqlite with Visual Basic There is a VBWrapper.zip in the old SQLite yahoo group's file section. The archive contains wrapper over the SQLite API so that it can be used from VB. The API declarations for VB are also in the archieve. Get it from here: http://f4.grp.yahoofs.com/v1/EBqkQKgMWwt8clzVakFnZ6GAGVancQ9q-4gKNXEFX9QQmKI vHaVaTJ9rp1fz-XHaFxRIq46etnp1v_WDUrQPABeSNps/VB%20Wrapper If you cannot download from the link above then you will have to join the group to get it. HTH, Jalil Vaidya Disclaimer: I have never used this wrapper myself. --- Carlos Garces wrote: > Hi! > I can use SQLLite with Visual Basic without using > other external DLL > Any sample of using sqlite.dll API? > > Thanks > Carlos Garcis = 01001010 0111 01101100 01101001 01101100 __ Do you Yahoo!? Yahoo! Movies - Buy advance tickets for 'Shrek 2' http://movies.yahoo.com/showtimes/movie?mid=1808405861 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] > ATTACHMENT part 2 application/x-zip-compressed name=VBSQLite.zip - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[sqlite] SQLite COM Wrapper written in ATL
To all VB users out there trying to figure out how to use sqlite in VB: I have written a COM wrapper in ATL which features an ADO like object model (Connection and Recordset). From the tests I've run, it's quite fast. It doesn't need a separate sqlite.dll (sqlite source is in the COM wrapper). Just tell me how interested you are and I will try to publish it. Regards, George Ionescu - Original Message - From: "Carlos Garces" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Thursday, May 13, 2004 10:59 PM Subject: sqlite with Visual Basic Hi! I can use SQLLite with Visual Basic without using other external DLL Any sample of using sqlite.dll API? Thanks Carlos Garcés - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [sqlite] Question about expected query result??
> > On MS SQL Server 2000, one can pass a field name to the COUNT function, and > > though I haven't yet seen any difference in the results between the two, the > > queries run faster with COUNT() than with COUNT(*). > > COUNT(fieldname) provides the count of rows where the data in 'fieldname' is > non-null. COUNT(*) provides the total count of rows: Ah. I guess that pretty much explains that. I seldom do counts without a WHERE clause of some sort that would preclude counting nulls in the first place. Thanks. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[sqlite] Varchar with numbers dumped without quotes
SQLite: 2.8.13 OS: HP-UX B.11.11 Hi, char and varchar fields containing digits only are dumped without qoutes: sqlite> create table my_table(id integer primary key, A varchar(25), B char(25)); sqlite> insert into my_table values(NULL, '1234567890','1234567890'); sqlite> insert into my_table values(NULL, ' 12345', '12345x'); $ sqlite dbfile.sqlite ".dump" > dbfile_dump.sql File dbfile.sql: create table my_table(id integer primary key, A varchar(25), B char(25)); INSERT INTO my_table VALUES(1,1234567890,1234567890); INSERT INTO my_table VALUES(2,' 12345','12345x'); I understand this is due to SQLite typelessness. Is it, by any chance, possible to change this (char, varchar, text, etc. 'text' fields dumped always with quotes) ? Or would it be violation of principle ? Sometimes I need to use SQLite-generated scripts to load other databases, which are type-sensitive and it would really help. Regards, Jarek Jaroslaw Nozderko GSM +48 601131870 / Kapsch (22) 6075013 [EMAIL PROTECTED] IT/CCBS/RS - Analyst Programmer - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[sqlite] Re: SQLite version 3 design question: '500'=500?
Hello Dr. Hipp, Hello SQLite users, CREATE TABLE test1(a VARCHAR(100)); INSERT INTO test1 VALUES('501'); INSERT INTO test1 VALUES(' 502 '); SELECT * FROM test1 WHERE a=501; SELECT * FROM test1 WHERE a=502; SELECT * FROM test1 WHERE a<'502'; in MS SQL Server yelds the following results: a 501 a 502 a 501 502 (please observe spacing from ' 502 ', meaning that it's treated on output as a string (field's datatype from CREATE TABLE statement)) and the following: CREATE TABLE test2(b INTEGER); INSERT INTO test2 VALUES(503); INSERT INTO test2 VALUES(504); SELECT * FROM test2 WHERE b='503'; SELECT * FROM test2 WHERE b>'503'; produces: b 503 b 504 Best regards, George Ionescu