Re: [sqlite] sqlite3_complete always returning 1?
Thanks for the report. You're right that it was indeed inconsistent with the stated requirements. I've checked in a fix here: http://www.sqlite.org/src/vinfo/76eca7295cf7df4bef013af6c8c37251300cd383 We're still evaluating whether to keep the code change or fall back to editing the requirement, as the issue has been around for a long time and this change affects the existing operation of the interface. -Shane On Thu, Dec 17, 2009 at 10:39 AM, Nicolas Rivera wrote: > >>If I am doing something wrong, does anyone have an idea of what it could > be? > > >It doesn't sound like it. > > That's all I was looking for. > > Thanks! > > Nick > ___ > sqlite-users mailing list > sqlite-users@sqlite.org > http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users > ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
Re: [sqlite] using Oracle SQL, ignoring user
lsloan wrote: > That is, if a query to Oracle was: > > select * from user1.table1 > > Then SQLite would treat it as: > > select * from table1 > > Since SQLite doesn't have users. > > Am I right about that? No. SQLite supports multiple named databases on a single connection (see ATTACH statement). The part before the period is taken to be the database name. Igor Tandetnik ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
[sqlite] using Oracle SQL, ignoring user
I heard that SQLite can use much of Oracle SQL, at least if the queries confirm to the style/standard that SQLite uses. Especially, I thought I heard that SQLite will ignore the "user" or "schema" name parts of the SQL statements. That is, if a query to Oracle was: select * from user1.table1 Then SQLite would treat it as: select * from table1 Since SQLite doesn't have users. Am I right about that? If not, I suppose I will have to use some conditional code to include the Oracle user name or not, depending on whether my application is connecting to the production DB or my local SQLite development one. -- View this message in context: http://old.nabble.com/using-Oracle-SQL%2C-ignoring-user-tp26836571p26836571.html Sent from the SQLite mailing list archive at Nabble.com. ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
Re: [sqlite] speed up a sorted union all query
On Dec 17, 2009, at 11:20 AM, Robert Citek wrote: > Hello all, > > How can I speed up the sorting of a union all query? If you can use UNION instead of UNION ALL and both subqueries have appropriate indices, then the ORDER BY will probably make use of the indices to extract the elements in sorted order to begin with and no sorting will occur. D. Richard Hipp d...@hwaci.com ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
Re: [sqlite] speed up a sorted union all query
On Thu, Dec 17, 2009 at 1:32 PM, Igor Tandetnik wrote: > Robert Citek > wrote: >> How can I speed up the sorting of a union all query? > > Basically, you can't. An index can't be used for this. Consider changing your > requirements, or your design, to make such a query unnecessary. Thanks, Igor. A quick workaround was for me to trade space for time by creating a temporary table, creating an index, and then querying the temporary table. Seems faster, but will post numbers in a bit. Regards, - Robert ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
Re: [sqlite] speed up a sorted union all query
Robert Citek wrote: > How can I speed up the sorting of a union all query? Basically, you can't. An index can't be used for this. Consider changing your requirements, or your design, to make such a query unnecessary. Igor Tandetnik ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
Re: [sqlite] How to find out which row had been modified by an UPDATE statement?
On Thu, Dec 17, 2009 at 11:05 AM, Martin Kirsche wrote: > Hi, > is it possible in SQLite to find out which row had been modified by an > UPDATE statement? > just SELECT with the same params that you used in your UPDATE. -- Puneet Kishor http://www.punkish.org Carbon Model http://carbonmodel.org Charter Member, Open Source Geospatial Foundation http://www.osgeo.org Science Commons Fellow, http://sciencecommons.org/about/whoweare/kishor Nelson Institute, UW-Madison http://www.nelson.wisc.edu --- Assertions are politics; backing up assertions with evidence is science === Sent from Madison, Wisconsin, United States ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
[sqlite] How to find out which row had been modified by an UPDATE statement?
Hi, is it possible in SQLite to find out which row had been modified by an UPDATE statement? regards, Martin ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
Re: [sqlite] Using sqlite3: Excess memory consumed ?
On Thu, Dec 17, 2009 at 04:46:08PM +, Simon Slavin scratched on the wall: > > On 17 Dec 2009, at 4:38pm, Kavita Raghunathan wrote: > > > It is an option to merge tables, but the concern there is that the speed of > > lookup maybe compromised? > > The speed of lookup will be very small if you have an INDEX which > matches what the SELECT asks for. Of course, an index has its own B-Tree, plus a full copy of the indexed data. This is likely to add much more overhead than you'll gain back by merging a few tables. Personally I don't think the overhead described is out of line, especially if none of the user columns are marked INTEGER PRIMARY KEY. -j -- Jay A. Kreibich < J A Y @ K R E I B I.C H > "Our opponent is an alien starship packed with atomic bombs. We have a protractor." "I'll go home and see if I can scrounge up a ruler and a piece of string." --from Anathem by Neal Stephenson ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
Re: [sqlite] Using sqlite3: Excess memory consumed ?
Good answer. Thanks, we may have more questions for you. Kavita On 12/17/09 10:46 AM, "Simon Slavin" wrote: > > On 17 Dec 2009, at 4:38pm, Kavita Raghunathan wrote: > >> It is an option to merge tables, but the concern there is that the speed of >> lookup maybe compromised? > > The speed of lookup will be very small if you have an INDEX which matches what > the SELECT asks for. So if, for example your SELECT is > > SELECT colA, colB FROM myTable WHERE source='aaa' AND colA='' > > then the TABLE myTable should have an INDEX (perhaps the primary index) which > is on the two columns > > source,colA > > For the number of records you quote, this will make the SELECT very fast. > > Simon. > ___ > sqlite-users mailing list > sqlite-users@sqlite.org > http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
Re: [sqlite] Using sqlite3: Excess memory consumed ?
On 17 Dec 2009, at 4:38pm, Kavita Raghunathan wrote: > It is an option to merge tables, but the concern there is that the speed of > lookup maybe compromised? The speed of lookup will be very small if you have an INDEX which matches what the SELECT asks for. So if, for example your SELECT is SELECT colA, colB FROM myTable WHERE source='aaa' AND colA='' then the TABLE myTable should have an INDEX (perhaps the primary index) which is on the two columns source,colA For the number of records you quote, this will make the SELECT very fast. Simon. ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
Re: [sqlite] Using sqlite3: Excess memory consumed ?
Thanks. We are running the analyzer that Mr Hipp reccomended. It is an option to merge tables, but the concern there is that the speed of lookup maybe compromised? I know, we cannot have it all :-) But if there is a way we can have "close to all", please let us know. Kavita On 12/17/09 10:24 AM, "Simon Slavin" wrote: > > On 17 Dec 2009, at 3:44pm, Kavita Raghunathan wrote: > >> We have a pressing need to reduce memory consumption. Your help is >> appreciated. >> >> We have a database 672 tables, all with the same layout: 2 columns of 4 bytes >> each and 186 rows. >> Theoretically, the memory consumed should be: >> >> 672 * (2 *4 * 186) = 36 Bytes ~= 1.0 MB >> >> However, the actual memory consumed is >> >> 4.2MB >> >> Is the difference due to overhead of using Sqlite3 ? Can you recommend ways >> for us to cut down? > > There is a big overhead for each table. You have 672 tables, so you have lots > of overheads. If these are lots of tables with the same schema (same columns) > then merge them all into one table using an extra column to tell which source > each row comes from. > > Also, each table has, at least, one index: the PRIMARY INDEX. This includes a > copy of the data in any column in the primary key. So if, for example, in > each table one of your columns of 4 bytes is the primary key, then you have at > least another 0.5 MB of data in your indexes. > > Simon. > ___ > sqlite-users mailing list > sqlite-users@sqlite.org > http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
Re: [sqlite] speed up a sorted union all query
On Thu, Dec 17, 2009 at 11:20 AM, Robert Citek wrote: > How can I speed up the sorting of a union all query? BTW, here is a method for creating a sample dataset: $ echo {1..1000}$'\t'{1..200}$'\t'1 | tr ' ' '\n' | sqlite3 -init <(echo ' create table foo (amp1 INTEGER, amp2 INTEGER, tag INTEGER) ; .mod tabs .imp "/dev/stdin" "foo" ') foo.db .quit Regards, - Robert ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
Re: [sqlite] Using sqlite3: Excess memory consumed ?
On 17 Dec 2009, at 3:44pm, Kavita Raghunathan wrote: > We have a pressing need to reduce memory consumption. Your help is > appreciated. > > We have a database 672 tables, all with the same layout: 2 columns of 4 bytes > each and 186 rows. > Theoretically, the memory consumed should be: > > 672 * (2 *4 * 186) = 36 Bytes ~= 1.0 MB > > However, the actual memory consumed is > > 4.2MB > > Is the difference due to overhead of using Sqlite3 ? Can you recommend ways > for us to cut down? There is a big overhead for each table. You have 672 tables, so you have lots of overheads. If these are lots of tables with the same schema (same columns) then merge them all into one table using an extra column to tell which source each row comes from. Also, each table has, at least, one index: the PRIMARY INDEX. This includes a copy of the data in any column in the primary key. So if, for example, in each table one of your columns of 4 bytes is the primary key, then you have at least another 0.5 MB of data in your indexes. Simon. ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
[sqlite] speed up a sorted union all query
Hello all, How can I speed up the sorting of a union all query? Here are two queries which effectively create the same output. However the first one pipes the output from the union all to the shell's sort command whereas the second one used an order by clause. In addition, the second query explodes in the amount of time it takes for large data sets, becoming unusable after about 500,000 records. In contrast, the first is still reasonable even past several million records. $ time -p { grep -v ^#
Re: [sqlite] Error in retreiving DATETIME('NOW')
> but i want to use my localtime as default time in sqlite(without giving > 'localtime'). is it possible? No. And documentation clearly says about that. Pavel On Thu, Dec 17, 2009 at 11:08 AM, greensparker wrote: > > SELECT DATETIME('NOW','localtime'); is WORKED > but i want to use my localtime as default time in sqlite(without giving > 'localtime'). is it possible? > > Greensparker > > > SimonDavies wrote: >> >> 2009/12/17 greensparker : >>> >>> hi, >>> im having a error in retreiving the DATETIME from SQLITE >>> im in DEBIAN. >>> when i give SELECT DATETIME('NOW') >>> im getting the TIME : 2009-12-17 15:35 >>> but my system time is : 2009-12-17 21:05 IST >>> >>> my timezone is INDIA. IST. >>> >>> pls tell me, why DATETIME() function gives wrong time? >> >> Have you tried >> SELECT DATETIME('NOW','localtime'); ? >> >> See http://www.sqlite.org/lang_datefunc.html >> >>> >>> Greensparker >> >> >> Regards, >> Simon >> ___ >> sqlite-users mailing list >> sqlite-users@sqlite.org >> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users >> >> > > -- > View this message in context: > http://old.nabble.com/Error-in-retreiving-DATETIME%28%27NOW%27%29-tp26829800p26830439.html > Sent from the SQLite mailing list archive at Nabble.com. > > ___ > sqlite-users mailing list > sqlite-users@sqlite.org > http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users > ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
Re: [sqlite] Error in retreiving DATETIME('NOW')
SELECT DATETIME('NOW','localtime'); is WORKED but i want to use my localtime as default time in sqlite(without giving 'localtime'). is it possible? Greensparker SimonDavies wrote: > > 2009/12/17 greensparker : >> >> hi, >> im having a error in retreiving the DATETIME from SQLITE >> im in DEBIAN. >> when i give SELECT DATETIME('NOW') >> im getting the TIME : 2009-12-17 15:35 >> but my system time is : 2009-12-17 21:05 IST >> >> my timezone is INDIA. IST. >> >> pls tell me, why DATETIME() function gives wrong time? > > Have you tried > SELECT DATETIME('NOW','localtime'); ? > > See http://www.sqlite.org/lang_datefunc.html > >> >> Greensparker > > > Regards, > Simon > ___ > sqlite-users mailing list > sqlite-users@sqlite.org > http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users > > -- View this message in context: http://old.nabble.com/Error-in-retreiving-DATETIME%28%27NOW%27%29-tp26829800p26830439.html Sent from the SQLite mailing list archive at Nabble.com. ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
Re: [sqlite] Using sqlite3: Excess memory consumed ?
On Dec 17, 2009, at 10:53 AM, Kavita Raghunathan wrote: > > Thanks for the reply. You are right we should VACUUM in cases where > we are > removing items. But, this question is not about removing. > This question is about a fully populated database and it seems > bloated to be > occuping 3 times the memory. Maybe this amount of memory is considered > normal since we are using SQL and sqlite. Just wanted to check if > that is in > fact the case. Did you run the "sqlite3_analyzer.exe" utility on your database file to see how disk space is being used? Get a copy from the Download page on the SQLite website. D. Richard Hipp d...@hwaci.com ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
Re: [sqlite] Using sqlite3: Excess memory consumed ?
Thanks for the reply. You are right we should VACUUM in cases where we are removing items. But, this question is not about removing. This question is about a fully populated database and it seems bloated to be occuping 3 times the memory. Maybe this amount of memory is considered normal since we are using SQL and sqlite. Just wanted to check if that is in fact the case. On 12/17/09 9:48 AM, "Kurt D. Knudsen" wrote: > Did you try to VACUUM the database? When items are removed from the > database, the size doesn't shrink, it just marks the pages as free. > Correct me if I'm wrong. > > Kurt > > -Original Message- > From: sqlite-users-boun...@sqlite.org > [mailto:sqlite-users-boun...@sqlite.org] On Behalf Of Kavita Raghunathan > Sent: Thursday, December 17, 2009 10:44 AM > To: Discussion of SQLite Database > Cc: Kelvin Xu > Subject: [sqlite] Using sqlite3: Excess memory consumed ? > > Hi, > We have a pressing need to reduce memory consumption. Your help is > appreciated. > > We have a database 672 tables, all with the same layout: 2 columns of 4 > bytes each and 186 rows. > Theoretically, the memory consumed should be: > > 672 * (2 *4 * 186) = 36 Bytes ~= 1.0 MB > > However, the actual memory consumed is > > 4.2MB > > Is the difference due to overhead of using Sqlite3 ? Can you recommend > ways for us to cut down? > > Thanks for your input, > Regards, > Kavita & Skyfiber team > ===More Info about our > database > All 672 tables look like this: Example Row below > > Index(4 bytes) Value(4 bytes) > 0x 0x > ___ > sqlite-users mailing list > sqlite-users@sqlite.org > http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users > ___ > sqlite-users mailing list > sqlite-users@sqlite.org > http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
Re: [sqlite] Using sqlite3: Excess memory consumed ?
Did you try to VACUUM the database? When items are removed from the database, the size doesn't shrink, it just marks the pages as free. Correct me if I'm wrong. Kurt -Original Message- From: sqlite-users-boun...@sqlite.org [mailto:sqlite-users-boun...@sqlite.org] On Behalf Of Kavita Raghunathan Sent: Thursday, December 17, 2009 10:44 AM To: Discussion of SQLite Database Cc: Kelvin Xu Subject: [sqlite] Using sqlite3: Excess memory consumed ? Hi, We have a pressing need to reduce memory consumption. Your help is appreciated. We have a database 672 tables, all with the same layout: 2 columns of 4 bytes each and 186 rows. Theoretically, the memory consumed should be: 672 * (2 *4 * 186) = 36 Bytes ~= 1.0 MB However, the actual memory consumed is 4.2MB Is the difference due to overhead of using Sqlite3 ? Can you recommend ways for us to cut down? Thanks for your input, Regards, Kavita & Skyfiber team ===More Info about our database All 672 tables look like this: Example Row below Index(4 bytes) Value(4 bytes) 0x 0x ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
[sqlite] Using sqlite3: Excess memory consumed ?
Hi, We have a pressing need to reduce memory consumption. Your help is appreciated. We have a database 672 tables, all with the same layout: 2 columns of 4 bytes each and 186 rows. Theoretically, the memory consumed should be: 672 * (2 *4 * 186) = 36 Bytes ~= 1.0 MB However, the actual memory consumed is 4.2MB Is the difference due to overhead of using Sqlite3 ? Can you recommend ways for us to cut down? Thanks for your input, Regards, Kavita & Skyfiber team ===More Info about our database All 672 tables look like this: Example Row below Index(4 bytes) Value(4 bytes) 0x 0x ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
Re: [sqlite] Compiling SQLite as .lib increases projectsizeandbuildtime?
Seems I need to put the following in the Preprocessor Definitions: SQLITE_ENABLE_COLUMN_METADATA This makes it compile just dandy. Now my file sizes are back to normal. Hoorah. You guys are amazing, a baker's dozen internets to each of you. Regards, Kurt -Original Message- From: sqlite-users-boun...@sqlite.org [mailto:sqlite-users-boun...@sqlite.org] On Behalf Of Kurt D. Knudsen Sent: Thursday, December 17, 2009 10:31 AM To: General Discussion of SQLite Database Subject: Re: [sqlite] Compiling SQLite as .lib increases projectsizeandbuildtime? Yeah, seems to be giving me odd Linker errors now. I'm stumped. The .def file is in the project's folder and is referenced in the properties page. When I compile SQLite3, I get the following: 1>Compiling... 1>sqlite3.c 1>Linking... 1>sqlite3.def : error LNK2001: unresolved external symbol sqlite3_column_database_name 1>sqlite3.def : error LNK2001: unresolved external symbol sqlite3_column_database_name16 1>sqlite3.def : error LNK2001: unresolved external symbol sqlite3_column_origin_name 1>sqlite3.def : error LNK2001: unresolved external symbol sqlite3_column_origin_name16 1>sqlite3.def : error LNK2001: unresolved external symbol sqlite3_column_table_name 1>sqlite3.def : error LNK2001: unresolved external symbol sqlite3_column_table_name16 1>sqlite3.def : error LNK2001: unresolved external symbol sqlite3_table_column_metadata 1>D:\SQLite\Release\sqlite3.lib : fatal error LNK1120: 7 unresolved externals 1>Build log was saved at "file://d:\SQLite\sqlite\Release\BuildLog.htm" 1>sqlite3 - 8 error(s), 0 warning(s) == Rebuild All: 0 succeeded, 1 failed, 0 skipped == Any ideas? -Original Message- From: sqlite-users-boun...@sqlite.org [mailto:sqlite-users-boun...@sqlite.org] On Behalf Of Kurt D. Knudsen Sent: Thursday, December 17, 2009 10:19 AM To: General Discussion of SQLite Database Subject: Re: [sqlite] Compiling SQLite as .lib increases projectsizeandbuild time? Hi Pavel, I think that's the issue. The .def file was never included. I put the .def file in the sqlite's project folder and am getting linker errors when I compile. I probably didn't reference it properly, I'll report back in a few minutes with success or failure. --- Igor --- In Sqlite project, check Properties | Linker | Advanced | Import Library. Make sure it's not empty (normally, you should see something like $(OutputDir)$(TargetName).lib in there). Linker produces an import library (a LIB file) as a side-effect or building a DLL (unless this is suppressed). Projects using the DLL need the import library to link to. Igor Tandetnik -- It is set to generate a .lib according to that setting, but from what Pavel said, it never does because the .def file is missing from the project. I've never heard of .def files before so this is a new issue for me. This is all quite exciting :) Thanks, Kurt -Original Message- From: sqlite-users-boun...@sqlite.org [mailto:sqlite-users-boun...@sqlite.org] On Behalf Of Pavel Ivanov Sent: Thursday, December 17, 2009 10:04 AM To: General Discussion of SQLite Database Subject: Re: [sqlite] Compiling SQLite as .lib increases project sizeandbuild time? > If I remove the dependency on sqlite from HouseKeeper, it gives linker > errors with unresolved symbols for sqlite3_* functions. Adding sqlite as > a dependency to HouseKeeper causes it to look for the sqlite.lib file. Make sure that .def file is included in you Sqlite project. When compiling project as dll, compiler generates stub .lib file anyway for linking with anybody who will need this dll. But if you don't include .def file and thus don't define any functions to export from dll, compiler doesn't generate .lib file and it can cause the error you see. Pavel On Thu, Dec 17, 2009 at 9:49 AM, Kurt D. Knudsen wrote: > Pavel, > > I have not defined it in the Linker properties. I have a solution called > 'SQLite Test' and inside it consists of 4 projects: > > HouseKeeper - compiles as .dll > Common - compiles as .dll > SQLiteTest - compiles as .exe > Sqlite - forced to compile as .lib (Why?!) > > Under Project Dependencies: > * HouseKeeper is dependent on Common and sqlite. > * Common is dependent on just sqlite > * SQLiteTest is dependent on HouseKeeper, Common, and sqlite > > If I remove the dependency on sqlite from HouseKeeper, it gives linker > errors with unresolved symbols for sqlite3_* functions. Adding sqlite as > a dependency to HouseKeeper causes it to look for the sqlite.lib file. > > --- > > Teg, > > I'd like to keep it an external .dll file if possible, it doesn't make > sense to me to have it added to each project that uses SQLite. SQLite > is, as stated above, its own project inside of the solution. > > How do I go about making the other projects reference the .dll instead > of requiring the .lib? I should note that I am not the original author > of this solution, just modifying it to use SQLite instead of flat-files. > So I am u
Re: [sqlite] Compiling SQLite as .lib increases projectsizeandbuild time?
This API is available in SQLite only if you compile with SQLITE_ENABLE_COLUMN_METADATA defined. Obviously you don't compile with this option and don't need it, so just remove these function names from .def file. Pavel On Thu, Dec 17, 2009 at 10:30 AM, Kurt D. Knudsen wrote: > Yeah, seems to be giving me odd Linker errors now. I'm stumped. The .def file > is in the project's folder and is referenced in the properties page. When I > compile SQLite3, I get the following: > > 1>Compiling... > 1>sqlite3.c > 1>Linking... > 1>sqlite3.def : error LNK2001: unresolved external symbol > sqlite3_column_database_name > 1>sqlite3.def : error LNK2001: unresolved external symbol > sqlite3_column_database_name16 > 1>sqlite3.def : error LNK2001: unresolved external symbol > sqlite3_column_origin_name > 1>sqlite3.def : error LNK2001: unresolved external symbol > sqlite3_column_origin_name16 > 1>sqlite3.def : error LNK2001: unresolved external symbol > sqlite3_column_table_name > 1>sqlite3.def : error LNK2001: unresolved external symbol > sqlite3_column_table_name16 > 1>sqlite3.def : error LNK2001: unresolved external symbol > sqlite3_table_column_metadata > 1>D:\SQLite\Release\sqlite3.lib : fatal error LNK1120: 7 unresolved externals > 1>Build log was saved at "file://d:\SQLite\sqlite\Release\BuildLog.htm" > 1>sqlite3 - 8 error(s), 0 warning(s) > == Rebuild All: 0 succeeded, 1 failed, 0 skipped == > > Any ideas? > > -Original Message- > From: sqlite-users-boun...@sqlite.org > [mailto:sqlite-users-boun...@sqlite.org] On Behalf Of Kurt D. Knudsen > Sent: Thursday, December 17, 2009 10:19 AM > To: General Discussion of SQLite Database > Subject: Re: [sqlite] Compiling SQLite as .lib increases projectsizeandbuild > time? > > Hi Pavel, > > I think that's the issue. The .def file was never included. I put the .def > file in the sqlite's project folder and am getting linker errors when I > compile. I probably didn't reference it properly, I'll report back in a few > minutes with success or failure. > > > --- Igor --- > In Sqlite project, check Properties | Linker | Advanced | Import Library. > Make sure it's not empty (normally, you should see something like > $(OutputDir)$(TargetName).lib in there). > > Linker produces an import library (a LIB file) as a side-effect or building a > DLL (unless this is suppressed). Projects using the DLL need the import > library to link to. > > Igor Tandetnik > > -- > It is set to generate a .lib according to that setting, but from what Pavel > said, it never does because the .def file is missing from the project. I've > never heard of .def files before so this is a new issue for me. This is all > quite exciting :) > > Thanks, > > Kurt > > -Original Message- > From: sqlite-users-boun...@sqlite.org > [mailto:sqlite-users-boun...@sqlite.org] On Behalf Of Pavel Ivanov > Sent: Thursday, December 17, 2009 10:04 AM > To: General Discussion of SQLite Database > Subject: Re: [sqlite] Compiling SQLite as .lib increases project sizeandbuild > time? > >> If I remove the dependency on sqlite from HouseKeeper, it gives linker >> errors with unresolved symbols for sqlite3_* functions. Adding sqlite as >> a dependency to HouseKeeper causes it to look for the sqlite.lib file. > > Make sure that .def file is included in you Sqlite project. When > compiling project as dll, compiler generates stub .lib file anyway for > linking with anybody who will need this dll. But if you don't include > .def file and thus don't define any functions to export from dll, > compiler doesn't generate .lib file and it can cause the error you > see. > > Pavel > > On Thu, Dec 17, 2009 at 9:49 AM, Kurt D. Knudsen > wrote: >> Pavel, >> >> I have not defined it in the Linker properties. I have a solution called >> 'SQLite Test' and inside it consists of 4 projects: >> >> HouseKeeper - compiles as .dll >> Common - compiles as .dll >> SQLiteTest - compiles as .exe >> Sqlite - forced to compile as .lib (Why?!) >> >> Under Project Dependencies: >> * HouseKeeper is dependent on Common and sqlite. >> * Common is dependent on just sqlite >> * SQLiteTest is dependent on HouseKeeper, Common, and sqlite >> >> If I remove the dependency on sqlite from HouseKeeper, it gives linker >> errors with unresolved symbols for sqlite3_* functions. Adding sqlite as >> a dependency to HouseKeeper causes it to look for the sqlite.lib file. >> >> --- >> >> Teg, >> >> I'd like to keep it an external .dll file if possible, it doesn't make >> sense to me to have it added to each project that uses SQLite. SQLite >> is, as stated above, its own project inside of the solution. >> >> How do I go about making the other projects reference the .dll instead >> of requiring the .lib? I should note that I am not the original author >> of this solution, just modifying it to use SQLite instead of flat-files. >> So I am unsure how the other developer set the solution up since >> HouseKeeper and Common both compile as .dl
Re: [sqlite] sqlite3_complete always returning 1?
>>If I am doing something wrong, does anyone have an idea of what it could be? >It doesn't sound like it. That's all I was looking for. Thanks! Nick ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
Re: [sqlite] Error in retreiving DATETIME('NOW')
> pls tell me, why DATETIME() function gives wrong time? http://www.sqlite.org/lang_datefunc.html "Format 11, the string 'now', is converted into the current date and time as obtained from the xCurrentTime method of the sqlite3_vfs object in use. Universal Coordinated Time (UTC) is used." Use datetime('now', 'localtime') if you want time in your timezone. Pavel On Thu, Dec 17, 2009 at 10:34 AM, greensparker wrote: > > hi, > im having a error in retreiving the DATETIME from SQLITE > im in DEBIAN. > when i give SELECT DATETIME('NOW') > im getting the TIME : 2009-12-17 15:35 > but my system time is : 2009-12-17 21:05 IST > > my timezone is INDIA. IST. > > pls tell me, why DATETIME() function gives wrong time? > > Greensparker > -- > View this message in context: > http://old.nabble.com/Error-in-retreiving-DATETIME%28%27NOW%27%29-tp26829800p26829800.html > Sent from the SQLite mailing list archive at Nabble.com. > > ___ > sqlite-users mailing list > sqlite-users@sqlite.org > http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users > ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
Re: [sqlite] Error in retreiving DATETIME('NOW')
2009/12/17 greensparker : > > hi, > im having a error in retreiving the DATETIME from SQLITE > im in DEBIAN. > when i give SELECT DATETIME('NOW') > im getting the TIME : 2009-12-17 15:35 > but my system time is : 2009-12-17 21:05 IST > > my timezone is INDIA. IST. > > pls tell me, why DATETIME() function gives wrong time? Have you tried SELECT DATETIME('NOW','localtime'); ? See http://www.sqlite.org/lang_datefunc.html > > Greensparker Regards, Simon ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
[sqlite] Error in retreiving DATETIME('NOW')
hi, im having a error in retreiving the DATETIME from SQLITE im in DEBIAN. when i give SELECT DATETIME('NOW') im getting the TIME : 2009-12-17 15:35 but my system time is : 2009-12-17 21:05 IST my timezone is INDIA. IST. pls tell me, why DATETIME() function gives wrong time? Greensparker -- View this message in context: http://old.nabble.com/Error-in-retreiving-DATETIME%28%27NOW%27%29-tp26829800p26829800.html Sent from the SQLite mailing list archive at Nabble.com. ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
Re: [sqlite] sqlite3_complete always returning 1?
On Thu, Dec 17, 2009 at 10:15:35AM -0500, Nicolas Rivera scratched on the wall: > Jay -- > > Are you saying that: > > (a) sqlite3_complete("") returns 0 in your system and therefore I must > be doing something wrong, > > (b) or sqlite3_complete("") does return 1 and it is a bug? I didn't test it. All I'm saying is that if an empty string returns true, and there isn't some other weird issue going on, then this behavior is contrary to the API call specification (which is even stronger than being contrary to the documentation). I was only offering support that this does, at first, appear to be an actual bug, and not a differing interpretation of the general call documentation. > If I am doing something wrong, does anyone have an idea of what it could be? It doesn't sound like it. -j >> On 12/16/2009 5:22 PM, Jay A. Kreibich wrote: >> >> On Wed, Dec 16, 2009 at 04:52:16PM -0500, Nicolas Rivera scratched on the >> wall: >> >>> Thanks for your reply Dr. Hipp. >>> >>> I just ran those, and they do return 0. >>> >>> But I am confused. The documentation says: >>> "These routines return 1 if the input string appears to be a complete >>> SQL statement. A statement is judged to be complete if it ends with a >>> semicolon token and is not a prefix of a well-formed CREATE TRIGGER >>> statement." >>> (http://www.hwaci.com/sw/sqlite/c3ref/complete.html) >>> >>> I guess a statement is also judged to be complete if it is the empty >>> string -- which does not end with a semicolon token. >> >> That seems wrong; empty string should return a 0 as the string does >> not contain "one or more non-whitespace tokens." >> >> http://sqlite.org/hlr1.html#H10511 >> >> H10511: A successful evaluation of sqlite3_complete() or >> sqlite3_complete16() functions shall return a numeric 1 if and only >> if the input string contains one or more non-whitespace tokens and >> the last non-whitespace token in is a semicolon that is not in the >> middle of a CREATE TRIGGER statement. >> >>-j >> >> >> -- Jay A. Kreibich < J A Y @ K R E I B I.C H > "Our opponent is an alien starship packed with atomic bombs. We have a protractor." "I'll go home and see if I can scrounge up a ruler and a piece of string." --from Anathem by Neal Stephenson ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
Re: [sqlite] Compiling SQLite as .lib increases projectsizeandbuild time?
Yeah, seems to be giving me odd Linker errors now. I'm stumped. The .def file is in the project's folder and is referenced in the properties page. When I compile SQLite3, I get the following: 1>Compiling... 1>sqlite3.c 1>Linking... 1>sqlite3.def : error LNK2001: unresolved external symbol sqlite3_column_database_name 1>sqlite3.def : error LNK2001: unresolved external symbol sqlite3_column_database_name16 1>sqlite3.def : error LNK2001: unresolved external symbol sqlite3_column_origin_name 1>sqlite3.def : error LNK2001: unresolved external symbol sqlite3_column_origin_name16 1>sqlite3.def : error LNK2001: unresolved external symbol sqlite3_column_table_name 1>sqlite3.def : error LNK2001: unresolved external symbol sqlite3_column_table_name16 1>sqlite3.def : error LNK2001: unresolved external symbol sqlite3_table_column_metadata 1>D:\SQLite\Release\sqlite3.lib : fatal error LNK1120: 7 unresolved externals 1>Build log was saved at "file://d:\SQLite\sqlite\Release\BuildLog.htm" 1>sqlite3 - 8 error(s), 0 warning(s) == Rebuild All: 0 succeeded, 1 failed, 0 skipped == Any ideas? -Original Message- From: sqlite-users-boun...@sqlite.org [mailto:sqlite-users-boun...@sqlite.org] On Behalf Of Kurt D. Knudsen Sent: Thursday, December 17, 2009 10:19 AM To: General Discussion of SQLite Database Subject: Re: [sqlite] Compiling SQLite as .lib increases projectsizeandbuild time? Hi Pavel, I think that's the issue. The .def file was never included. I put the .def file in the sqlite's project folder and am getting linker errors when I compile. I probably didn't reference it properly, I'll report back in a few minutes with success or failure. --- Igor --- In Sqlite project, check Properties | Linker | Advanced | Import Library. Make sure it's not empty (normally, you should see something like $(OutputDir)$(TargetName).lib in there). Linker produces an import library (a LIB file) as a side-effect or building a DLL (unless this is suppressed). Projects using the DLL need the import library to link to. Igor Tandetnik -- It is set to generate a .lib according to that setting, but from what Pavel said, it never does because the .def file is missing from the project. I've never heard of .def files before so this is a new issue for me. This is all quite exciting :) Thanks, Kurt -Original Message- From: sqlite-users-boun...@sqlite.org [mailto:sqlite-users-boun...@sqlite.org] On Behalf Of Pavel Ivanov Sent: Thursday, December 17, 2009 10:04 AM To: General Discussion of SQLite Database Subject: Re: [sqlite] Compiling SQLite as .lib increases project sizeandbuild time? > If I remove the dependency on sqlite from HouseKeeper, it gives linker > errors with unresolved symbols for sqlite3_* functions. Adding sqlite as > a dependency to HouseKeeper causes it to look for the sqlite.lib file. Make sure that .def file is included in you Sqlite project. When compiling project as dll, compiler generates stub .lib file anyway for linking with anybody who will need this dll. But if you don't include .def file and thus don't define any functions to export from dll, compiler doesn't generate .lib file and it can cause the error you see. Pavel On Thu, Dec 17, 2009 at 9:49 AM, Kurt D. Knudsen wrote: > Pavel, > > I have not defined it in the Linker properties. I have a solution called > 'SQLite Test' and inside it consists of 4 projects: > > HouseKeeper - compiles as .dll > Common - compiles as .dll > SQLiteTest - compiles as .exe > Sqlite - forced to compile as .lib (Why?!) > > Under Project Dependencies: > * HouseKeeper is dependent on Common and sqlite. > * Common is dependent on just sqlite > * SQLiteTest is dependent on HouseKeeper, Common, and sqlite > > If I remove the dependency on sqlite from HouseKeeper, it gives linker > errors with unresolved symbols for sqlite3_* functions. Adding sqlite as > a dependency to HouseKeeper causes it to look for the sqlite.lib file. > > --- > > Teg, > > I'd like to keep it an external .dll file if possible, it doesn't make > sense to me to have it added to each project that uses SQLite. SQLite > is, as stated above, its own project inside of the solution. > > How do I go about making the other projects reference the .dll instead > of requiring the .lib? I should note that I am not the original author > of this solution, just modifying it to use SQLite instead of flat-files. > So I am unsure how the other developer set the solution up since > HouseKeeper and Common both compile as .dll. > > I've been trying to contact the original developer that we hired but > can't seem to get a hold of him since we're in different time zones. > I'll try again to see if he can help me properly set up the solution if > I am making no sense here :) > > I hope you guys can help me out; it'd make life quite a bit easier. > > Thanks, > > Kurt > > -Original Message- >> 1>LINK : fatal error LNK1181: cannot open input file >> '..\release\sqlite.lib' > > Is t
[sqlite] [Gauging interest in patches...]: are published at fossil repository
Hello! On Tuesday 15 December 2009 19:05:31 D. Richard Hipp wrote: > Maintaining a fork of SQLite using Fossil is not difficult. A sketch > of one solution can be found at http://www.sqlite.org/ > privatebranch.html and there is an updated version of that document > at http://www.sqlite.org/draft/privatebranch.html that I prepared in > response to this very issue and which will be in the next official > release of SQLite. The patches are added to the new fossil repository http://sqlite.mobigroup.ru/ Best regards, Alexey Pechnikov. http://pechnikov.tel/ ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
Re: [sqlite] Compiling SQLite as .lib increases project sizeandbuild time?
Hi Pavel, I think that's the issue. The .def file was never included. I put the .def file in the sqlite's project folder and am getting linker errors when I compile. I probably didn't reference it properly, I'll report back in a few minutes with success or failure. --- Igor --- In Sqlite project, check Properties | Linker | Advanced | Import Library. Make sure it's not empty (normally, you should see something like $(OutputDir)$(TargetName).lib in there). Linker produces an import library (a LIB file) as a side-effect or building a DLL (unless this is suppressed). Projects using the DLL need the import library to link to. Igor Tandetnik -- It is set to generate a .lib according to that setting, but from what Pavel said, it never does because the .def file is missing from the project. I've never heard of .def files before so this is a new issue for me. This is all quite exciting :) Thanks, Kurt -Original Message- From: sqlite-users-boun...@sqlite.org [mailto:sqlite-users-boun...@sqlite.org] On Behalf Of Pavel Ivanov Sent: Thursday, December 17, 2009 10:04 AM To: General Discussion of SQLite Database Subject: Re: [sqlite] Compiling SQLite as .lib increases project sizeandbuild time? > If I remove the dependency on sqlite from HouseKeeper, it gives linker > errors with unresolved symbols for sqlite3_* functions. Adding sqlite as > a dependency to HouseKeeper causes it to look for the sqlite.lib file. Make sure that .def file is included in you Sqlite project. When compiling project as dll, compiler generates stub .lib file anyway for linking with anybody who will need this dll. But if you don't include .def file and thus don't define any functions to export from dll, compiler doesn't generate .lib file and it can cause the error you see. Pavel On Thu, Dec 17, 2009 at 9:49 AM, Kurt D. Knudsen wrote: > Pavel, > > I have not defined it in the Linker properties. I have a solution called > 'SQLite Test' and inside it consists of 4 projects: > > HouseKeeper - compiles as .dll > Common - compiles as .dll > SQLiteTest - compiles as .exe > Sqlite - forced to compile as .lib (Why?!) > > Under Project Dependencies: > * HouseKeeper is dependent on Common and sqlite. > * Common is dependent on just sqlite > * SQLiteTest is dependent on HouseKeeper, Common, and sqlite > > If I remove the dependency on sqlite from HouseKeeper, it gives linker > errors with unresolved symbols for sqlite3_* functions. Adding sqlite as > a dependency to HouseKeeper causes it to look for the sqlite.lib file. > > --- > > Teg, > > I'd like to keep it an external .dll file if possible, it doesn't make > sense to me to have it added to each project that uses SQLite. SQLite > is, as stated above, its own project inside of the solution. > > How do I go about making the other projects reference the .dll instead > of requiring the .lib? I should note that I am not the original author > of this solution, just modifying it to use SQLite instead of flat-files. > So I am unsure how the other developer set the solution up since > HouseKeeper and Common both compile as .dll. > > I've been trying to contact the original developer that we hired but > can't seem to get a hold of him since we're in different time zones. > I'll try again to see if he can help me properly set up the solution if > I am making no sense here :) > > I hope you guys can help me out; it'd make life quite a bit easier. > > Thanks, > > Kurt > > -Original Message- >> 1>LINK : fatal error LNK1181: cannot open input file >> '..\release\sqlite.lib' > > Is this filename something that you wrote yourself in configuration of > your project? If you compile something as dll you don't need to mention > its library as additional linking source in dependent projects. > > Pavel > > -Original Message- > From: sqlite-users-boun...@sqlite.org > [mailto:sqlite-users-boun...@sqlite.org] On Behalf Of Teg > Sent: Thursday, December 17, 2009 9:13 AM > To: General Discussion of SQLite Database > Subject: Re: [sqlite] Compiling SQLite as .lib increases project size > andbuild time? > > Hello Kurt, > > The size increase is because you're including code IN the program > instead of having it in a DLL. That's one of the benefits of DLLs. The > second thing, the build time thing is because you've chosen to build > SQLite each and every time you build the entire project. That's purely > a design choice in how you build. It's how I do it too. Your other > option is to make Sqlite it's own project and only build it when it > changes but, link it in by manually adding the lib path and lib name > to the linker. > > I have some projects I build every time when doing a release, like > SQlite and I have some projects like OpenSLL where I build once and > only reference the lib. > > I find that SQlite builds very quickly. Takes about 20 seconds in > release 64 bits with full optimization. I could make it faster if I > turned on pre-compiled headers but, it doesn't seem worth t
Re: [sqlite] sqlite3_complete always returning 1?
Jay -- Are you saying that: (a) sqlite3_complete("") returns 0 in your system and therefore I must be doing something wrong, (b) or sqlite3_complete("") does return 1 and it is a bug? If I am doing something wrong, does anyone have an idea of what it could be? The workaround is easy enough, but I am just curious if I have some setting or something wrong. Thanks, Nick > On 12/16/2009 5:22 PM, Jay A. Kreibich wrote: > > On Wed, Dec 16, 2009 at 04:52:16PM -0500, Nicolas Rivera scratched on the > wall: > >> Thanks for your reply Dr. Hipp. >> >> I just ran those, and they do return 0. >> >> But I am confused. The documentation says: >> "These routines return 1 if the input string appears to be a complete >> SQL statement. A statement is judged to be complete if it ends with a >> semicolon token and is not a prefix of a well-formed CREATE TRIGGER >> statement." >> (http://www.hwaci.com/sw/sqlite/c3ref/complete.html) >> > > >> I guess a statement is also judged to be complete if it is the empty >> string -- which does not end with a semicolon token. >> > > > That seems wrong; empty string should return a 0 as the string does > not contain "one or more non-whitespace tokens." > > http://sqlite.org/hlr1.html#H10511 > > H10511: A successful evaluation of sqlite3_complete() or > sqlite3_complete16() functions shall return a numeric 1 if and only > if the input string contains one or more non-whitespace tokens and > the last non-whitespace token in is a semicolon that is not in the > middle of a CREATE TRIGGER statement. > >-j > > > ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
Re: [sqlite] Compiling SQLite as .lib increases project size andbuild time?
> If I remove the dependency on sqlite from HouseKeeper, it gives linker > errors with unresolved symbols for sqlite3_* functions. Adding sqlite as > a dependency to HouseKeeper causes it to look for the sqlite.lib file. Make sure that .def file is included in you Sqlite project. When compiling project as dll, compiler generates stub .lib file anyway for linking with anybody who will need this dll. But if you don't include .def file and thus don't define any functions to export from dll, compiler doesn't generate .lib file and it can cause the error you see. Pavel On Thu, Dec 17, 2009 at 9:49 AM, Kurt D. Knudsen wrote: > Pavel, > > I have not defined it in the Linker properties. I have a solution called > 'SQLite Test' and inside it consists of 4 projects: > > HouseKeeper - compiles as .dll > Common - compiles as .dll > SQLiteTest - compiles as .exe > Sqlite - forced to compile as .lib (Why?!) > > Under Project Dependencies: > * HouseKeeper is dependent on Common and sqlite. > * Common is dependent on just sqlite > * SQLiteTest is dependent on HouseKeeper, Common, and sqlite > > If I remove the dependency on sqlite from HouseKeeper, it gives linker > errors with unresolved symbols for sqlite3_* functions. Adding sqlite as > a dependency to HouseKeeper causes it to look for the sqlite.lib file. > > --- > > Teg, > > I'd like to keep it an external .dll file if possible, it doesn't make > sense to me to have it added to each project that uses SQLite. SQLite > is, as stated above, its own project inside of the solution. > > How do I go about making the other projects reference the .dll instead > of requiring the .lib? I should note that I am not the original author > of this solution, just modifying it to use SQLite instead of flat-files. > So I am unsure how the other developer set the solution up since > HouseKeeper and Common both compile as .dll. > > I've been trying to contact the original developer that we hired but > can't seem to get a hold of him since we're in different time zones. > I'll try again to see if he can help me properly set up the solution if > I am making no sense here :) > > I hope you guys can help me out; it'd make life quite a bit easier. > > Thanks, > > Kurt > > -Original Message- >> 1>LINK : fatal error LNK1181: cannot open input file >> '..\release\sqlite.lib' > > Is this filename something that you wrote yourself in configuration of > your project? If you compile something as dll you don't need to mention > its library as additional linking source in dependent projects. > > Pavel > > -Original Message- > From: sqlite-users-boun...@sqlite.org > [mailto:sqlite-users-boun...@sqlite.org] On Behalf Of Teg > Sent: Thursday, December 17, 2009 9:13 AM > To: General Discussion of SQLite Database > Subject: Re: [sqlite] Compiling SQLite as .lib increases project size > andbuild time? > > Hello Kurt, > > The size increase is because you're including code IN the program > instead of having it in a DLL. That's one of the benefits of DLLs. The > second thing, the build time thing is because you've chosen to build > SQLite each and every time you build the entire project. That's purely > a design choice in how you build. It's how I do it too. Your other > option is to make Sqlite it's own project and only build it when it > changes but, link it in by manually adding the lib path and lib name > to the linker. > > I have some projects I build every time when doing a release, like > SQlite and I have some projects like OpenSLL where I build once and > only reference the lib. > > I find that SQlite builds very quickly. Takes about 20 seconds in > release 64 bits with full optimization. I could make it faster if I > turned on pre-compiled headers but, it doesn't seem worth the effort. > During development, it only build when it changes. > > Perhaps you only have one project and you've lumped everything > together? I'd break SQlite out into it's own project then use project > dependencies to make the linker include it. > > C > > Thursday, December 17, 2009, 9:01:04 AM, you wrote: > > KDK> Hi all, > > KDK> > > KDK> Since we're moving our project over from flat-files to an SQL DB, > I've > KDK> noticed that projects that utilize SQLite3 have increased to over > 500k > KDK> in size. Their original sizes were between 50-100k. Also, the build > KDK> times have increased dramatically. I have SQLite added as a > separate > KDK> project in my solution (Visual Studio 2008) and have its > Configuration > KDK> Type as .lib. If I set it to .dll, then the rest of the projects > fail to > KDK> link properly stating: > > KDK> > > 1>>LINK : fatal error LNK1181: cannot open input file > KDK> '..\release\sqlite.lib' > > KDK> > > KDK> I'm curious to know if this is normal behavior and if SQLite must > be > KDK> compiled as a .lib as opposed to a .dll? The odd thing is, I have > other > KDK> projects in the solution that are set to compile as a .dll and they > link > KDK> fine with each other. > > KD
Re: [sqlite] Compiling SQLite as .lib increases project sizeandbuild time?
Kurt D. Knudsen wrote: > I have not defined it in the Linker properties. I have a solution called > 'SQLite Test' and inside it consists of 4 projects: > > HouseKeeper - compiles as .dll > Common - compiles as .dll > SQLiteTest - compiles as .exe > Sqlite - forced to compile as .lib (Why?!) In Sqlite project, check Properties | Linker | Advanced | Import Library. Make sure it's not empty (normally, you should see something like $(OutputDir)$(TargetName).lib in there). Linker produces an import library (a LIB file) as a side-effect or building a DLL (unless this is suppressed). Projects using the DLL need the import library to link to. Igor Tandetnik ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
Re: [sqlite] Compiling SQLite as .lib increases project size andbuild time?
Pavel, I have not defined it in the Linker properties. I have a solution called 'SQLite Test' and inside it consists of 4 projects: HouseKeeper - compiles as .dll Common - compiles as .dll SQLiteTest - compiles as .exe Sqlite - forced to compile as .lib (Why?!) Under Project Dependencies: * HouseKeeper is dependent on Common and sqlite. * Common is dependent on just sqlite * SQLiteTest is dependent on HouseKeeper, Common, and sqlite If I remove the dependency on sqlite from HouseKeeper, it gives linker errors with unresolved symbols for sqlite3_* functions. Adding sqlite as a dependency to HouseKeeper causes it to look for the sqlite.lib file. --- Teg, I'd like to keep it an external .dll file if possible, it doesn't make sense to me to have it added to each project that uses SQLite. SQLite is, as stated above, its own project inside of the solution. How do I go about making the other projects reference the .dll instead of requiring the .lib? I should note that I am not the original author of this solution, just modifying it to use SQLite instead of flat-files. So I am unsure how the other developer set the solution up since HouseKeeper and Common both compile as .dll. I've been trying to contact the original developer that we hired but can't seem to get a hold of him since we're in different time zones. I'll try again to see if he can help me properly set up the solution if I am making no sense here :) I hope you guys can help me out; it'd make life quite a bit easier. Thanks, Kurt -Original Message- > 1>LINK : fatal error LNK1181: cannot open input file > '..\release\sqlite.lib' Is this filename something that you wrote yourself in configuration of your project? If you compile something as dll you don't need to mention its library as additional linking source in dependent projects. Pavel -Original Message- From: sqlite-users-boun...@sqlite.org [mailto:sqlite-users-boun...@sqlite.org] On Behalf Of Teg Sent: Thursday, December 17, 2009 9:13 AM To: General Discussion of SQLite Database Subject: Re: [sqlite] Compiling SQLite as .lib increases project size andbuild time? Hello Kurt, The size increase is because you're including code IN the program instead of having it in a DLL. That's one of the benefits of DLLs. The second thing, the build time thing is because you've chosen to build SQLite each and every time you build the entire project. That's purely a design choice in how you build. It's how I do it too. Your other option is to make Sqlite it's own project and only build it when it changes but, link it in by manually adding the lib path and lib name to the linker. I have some projects I build every time when doing a release, like SQlite and I have some projects like OpenSLL where I build once and only reference the lib. I find that SQlite builds very quickly. Takes about 20 seconds in release 64 bits with full optimization. I could make it faster if I turned on pre-compiled headers but, it doesn't seem worth the effort. During development, it only build when it changes. Perhaps you only have one project and you've lumped everything together? I'd break SQlite out into it's own project then use project dependencies to make the linker include it. C Thursday, December 17, 2009, 9:01:04 AM, you wrote: KDK> Hi all, KDK> KDK> Since we're moving our project over from flat-files to an SQL DB, I've KDK> noticed that projects that utilize SQLite3 have increased to over 500k KDK> in size. Their original sizes were between 50-100k. Also, the build KDK> times have increased dramatically. I have SQLite added as a separate KDK> project in my solution (Visual Studio 2008) and have its Configuration KDK> Type as .lib. If I set it to .dll, then the rest of the projects fail to KDK> link properly stating: KDK> 1>>LINK : fatal error LNK1181: cannot open input file KDK> '..\release\sqlite.lib' KDK> KDK> I'm curious to know if this is normal behavior and if SQLite must be KDK> compiled as a .lib as opposed to a .dll? The odd thing is, I have other KDK> projects in the solution that are set to compile as a .dll and they link KDK> fine with each other. KDK> KDK> Relevant information: KDK> KDK> Visual Studio 2008 Professional KDK> Compiling as Release KDK> KDK> Let me know if you need more information. KDK> KDK> Thanks, KDK> KDK> Kurt KDK> ___ KDK> sqlite-users mailing list KDK> sqlite-users@sqlite.org KDK> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users -- Best regards, Tegmailto:t...@djii.com ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
Re: [sqlite] Compiling SQLite as .lib increases project size and build time?
Hello Kurt, The size increase is because you're including code IN the program instead of having it in a DLL. That's one of the benefits of DLLs. The second thing, the build time thing is because you've chosen to build SQLite each and every time you build the entire project. That's purely a design choice in how you build. It's how I do it too. Your other option is to make Sqlite it's own project and only build it when it changes but, link it in by manually adding the lib path and lib name to the linker. I have some projects I build every time when doing a release, like SQlite and I have some projects like OpenSLL where I build once and only reference the lib. I find that SQlite builds very quickly. Takes about 20 seconds in release 64 bits with full optimization. I could make it faster if I turned on pre-compiled headers but, it doesn't seem worth the effort. During development, it only build when it changes. Perhaps you only have one project and you've lumped everything together? I'd break SQlite out into it's own project then use project dependencies to make the linker include it. C Thursday, December 17, 2009, 9:01:04 AM, you wrote: KDK> Hi all, KDK> KDK> Since we're moving our project over from flat-files to an SQL DB, I've KDK> noticed that projects that utilize SQLite3 have increased to over 500k KDK> in size. Their original sizes were between 50-100k. Also, the build KDK> times have increased dramatically. I have SQLite added as a separate KDK> project in my solution (Visual Studio 2008) and have its Configuration KDK> Type as .lib. If I set it to .dll, then the rest of the projects fail to KDK> link properly stating: KDK> 1>>LINK : fatal error LNK1181: cannot open input file KDK> '..\release\sqlite.lib' KDK> KDK> I'm curious to know if this is normal behavior and if SQLite must be KDK> compiled as a .lib as opposed to a .dll? The odd thing is, I have other KDK> projects in the solution that are set to compile as a .dll and they link KDK> fine with each other. KDK> KDK> Relevant information: KDK> KDK> Visual Studio 2008 Professional KDK> Compiling as Release KDK> KDK> Let me know if you need more information. KDK> KDK> Thanks, KDK> KDK> Kurt KDK> ___ KDK> sqlite-users mailing list KDK> sqlite-users@sqlite.org KDK> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users -- Best regards, Tegmailto:t...@djii.com ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
Re: [sqlite] Compiling SQLite as .lib increases project size and build time?
> 1>LINK : fatal error LNK1181: cannot open input file > '..\release\sqlite.lib' Is this filename something that you wrote yourself in configuration of your project? If you compile something as dll you don't need to mention its library as additional linking source in dependent projects. Pavel On Thu, Dec 17, 2009 at 9:01 AM, Kurt D. Knudsen wrote: > Hi all, > > > > Since we're moving our project over from flat-files to an SQL DB, I've > noticed that projects that utilize SQLite3 have increased to over 500k > in size. Their original sizes were between 50-100k. Also, the build > times have increased dramatically. I have SQLite added as a separate > project in my solution (Visual Studio 2008) and have its Configuration > Type as .lib. If I set it to .dll, then the rest of the projects fail to > link properly stating: > > > > 1>LINK : fatal error LNK1181: cannot open input file > '..\release\sqlite.lib' > > > > I'm curious to know if this is normal behavior and if SQLite must be > compiled as a .lib as opposed to a .dll? The odd thing is, I have other > projects in the solution that are set to compile as a .dll and they link > fine with each other. > > > > Relevant information: > > > > Visual Studio 2008 Professional > > Compiling as Release > > > > Let me know if you need more information. > > > > Thanks, > > > > Kurt > > ___ > sqlite-users mailing list > sqlite-users@sqlite.org > http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users > ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
[sqlite] Compiling SQLite as .lib increases project size and build time?
Hi all, Since we're moving our project over from flat-files to an SQL DB, I've noticed that projects that utilize SQLite3 have increased to over 500k in size. Their original sizes were between 50-100k. Also, the build times have increased dramatically. I have SQLite added as a separate project in my solution (Visual Studio 2008) and have its Configuration Type as .lib. If I set it to .dll, then the rest of the projects fail to link properly stating: 1>LINK : fatal error LNK1181: cannot open input file '..\release\sqlite.lib' I'm curious to know if this is normal behavior and if SQLite must be compiled as a .lib as opposed to a .dll? The odd thing is, I have other projects in the solution that are set to compile as a .dll and they link fine with each other. Relevant information: Visual Studio 2008 Professional Compiling as Release Let me know if you need more information. Thanks, Kurt ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
Re: [sqlite] Invitation to connect on LinkedIn
On 17 Dec 2009, at 11:25am, Artur Reilin wrote: > Is this spam? > >> LinkedIn >> >> >> >> >> >> I'd like to add you to my professional network on LinkedIn. Only a bit. It's the result of LinkedIn being evil. When you join it asks for your addressbook. It automatically sends an invitation message to every entry in your addressbook. This includes entries that are mailing lists or otherwise not real people. The moral: when you join LinkedIn don't give it access to your addressbook. Simon. ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
Re: [sqlite] a possible bug of select min(id) from...
nick huang wrote: > You are absolutely right that its type is NULL and min(id) returns 0 as I use > sqlite_column_int64 to retrieve data. However, > isn't it confusing that the "sqlite3_step" returns SQLITE_ROW which usually > means some dataset is returned? A resultset consisting of one row is indeed being returned. What's confusing about this? > I mean, if it returns > one NULL row, why doesn't sqlite simply return "SQLITE_DONE" or something > instead of "SQLITE_ROW"? An empty resultset and a resultset with one row that just happens to have NULLs in all columns are two entirely different things. Compare and contrast: select count(*) from (select id from url); select count(*) from (select min(id) from url); > You see, as user I have to > double-check its return type even after I get "SQLITE_ROW". In this sense, I > think it is a bug. Can you perhaps point to a clause in SQL-92 standard that SQLite violates here? A query involving an aggregate function without a GROUP BY clause always returns exactly one row. This is how SQL works. Igor Tandetnik ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
Re: [sqlite] a possible bug of select min(id) from...
Hi, sqlite works like any other database I know, and afaik conforms to sql standard. Martin nick huang schrieb: > Hi Igor, > > > > You are absolutely right that its type is NULL and min(id) returns 0 as I use > sqlite_column_int64 to retrieve data. However, isn't it confusing that the > "sqlite3_step" returns SQLITE_ROW which usually means some dataset is > returned? I mean, if it returns one NULL row, why doesn't sqlite simply > return "SQLITE_DONE" or something instead of "SQLITE_ROW"? You see, as user I > have to double-check its return type even after I get "SQLITE_ROW". In this > sense, I think it is a bug. > > > > thank you, > > > > >> To: sqlite-users@sqlite.org >> From: itandet...@mvps.org >> Date: Wed, 16 Dec 2009 21:00:43 -0500 >> Subject: Re: [sqlite] a possible bug of select min(id) from... >> >> nick huang wrote: >> >>> Say a table named "url" is created with "id" as primary key. Then a >>> query like this "select min(id) from url". >>> >>> Quite unexpectedly, the result of query returns "SQLITE_ROW" and the >>> min(id) is 0. However, my table is still empty which confuses me for >>> a while. >>> >> This statement should in fact return one row, with the value of NULL. How do >> you retrieve the value? If you use sqlite3_column_int, it'll convert NULL to >> 0 for you. Check with sqlite3_column_type. >> >> Igor Tandetnik >> >> ___ >> sqlite-users mailing list >> sqlite-users@sqlite.org >> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users >> > > > _ > Windows Live: Make it easier for your friends to see what you’re up to on > Facebook. > http://go.microsoft.com/?linkid=9691816 > ___ > sqlite-users mailing list > sqlite-users@sqlite.org > http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users > > ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
Re: [sqlite] a possible bug of select min(id) from...
Hi Igor, You are absolutely right that its type is NULL and min(id) returns 0 as I use sqlite_column_int64 to retrieve data. However, isn't it confusing that the "sqlite3_step" returns SQLITE_ROW which usually means some dataset is returned? I mean, if it returns one NULL row, why doesn't sqlite simply return "SQLITE_DONE" or something instead of "SQLITE_ROW"? You see, as user I have to double-check its return type even after I get "SQLITE_ROW". In this sense, I think it is a bug. thank you, > To: sqlite-users@sqlite.org > From: itandet...@mvps.org > Date: Wed, 16 Dec 2009 21:00:43 -0500 > Subject: Re: [sqlite] a possible bug of select min(id) from... > > nick huang wrote: > > Say a table named "url" is created with "id" as primary key. Then a > > query like this "select min(id) from url". > > > > Quite unexpectedly, the result of query returns "SQLITE_ROW" and the > > min(id) is 0. However, my table is still empty which confuses me for > > a while. > > This statement should in fact return one row, with the value of NULL. How do > you retrieve the value? If you use sqlite3_column_int, it'll convert NULL to > 0 for you. Check with sqlite3_column_type. > > Igor Tandetnik > > ___ > sqlite-users mailing list > sqlite-users@sqlite.org > http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users _ Windows Live: Make it easier for your friends to see what you’re up to on Facebook. http://go.microsoft.com/?linkid=9691816 ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
Re: [sqlite] requesting 2 tables about one select
Hi, this requires a simple join: select siterate.name, sitetype.name from siterate join sitetype on sitetype.id = siterate.type where sitetype.status!=1 This supposes that for every entry in siterate, there exists an entry in sitetypes with sitetype.id = siterate.type It seems to me that you might want to read up on SQL. Martin Artur Reilin schrieb: > I need help with my query. > > I have two tables: > > sitetypes( > id integer primary key not null, > name text > ) > > siterate( > id integer primary key not null, > type integer not null, > status integer not null, > ... > ... > ) > > This is my currently query: > $all_waiting_sites = sqlite_array_query('select name,type from > '.$databasename.'siterate where status!=1 order by name',$db); > > And i like that my query, that makes the type integer from siterate into > the name text from sitetypes. > > Thanks forward for helping me. > > with best wishes > > > Artur Reilin > sqlite.yuedream.de > ___ > sqlite-users mailing list > sqlite-users@sqlite.org > http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users > > ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
[sqlite] requesting 2 tables about one select
I need help with my query. I have two tables: sitetypes( id integer primary key not null, name text ) siterate( id integer primary key not null, type integer not null, status integer not null, ... ... ) This is my currently query: $all_waiting_sites = sqlite_array_query('select name,type from '.$databasename.'siterate where status!=1 order by name',$db); And i like that my query, that makes the type integer from siterate into the name text from sitetypes. Thanks forward for helping me. with best wishes Artur Reilin sqlite.yuedream.de ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
Re: [sqlite] Invitation to connect on LinkedIn
Is this spam? > LinkedIn > > > > > > I'd like to add you to my professional network on LinkedIn. > > - Neelamegam > > Neelamegam Appadurai > sss at Zoho Corporation > India > > Confirm that you know Neelamegam Appadurai > https://www.linkedin.com/e/isd/936554437/zokwXfFf/ > > > > -- > (c) 2009, LinkedIn Corporation > > ___ > sqlite-users mailing list > sqlite-users@sqlite.org > http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users > > Artur Reilin sqlite.yuedream.de ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users