Re: [sqlite] VC++ and SQLite
On Mon, Nov 12, 2012 at 1:52 PM, Doug Nebekerwrote: > You might be surprised at the speed increase you see in compile time if > you've got large projects. The time isn't lost to CPU as much, but disk I/O > time adds up when hitting many hundreds of small (header) files (even with > an SSD). > This is why I use PCH. Building some of my projects take a long time even on a 12 threaded processor with multiple SSDs. -- John M. Drescher ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
Re: [sqlite] SQLite Backup via Network
The application in question is a Windows desktop application, however, storing the data is typically stored remotely for proper backup procedures. I don't have control over where the files are stored, as this is an IT decision for the companies in question, and the software allows for users to store where they want. Also, the application has mobile access in mind via Laptop, and the unit may not always be hooked into the LAN/WAN, so, copying the data locally is essential for that particular instance. The remote file would never be directly acted on as the load mechanism would perform the backup to local, work on the local data, then when saved, the backup is done in reverse. If worse comes to worse, I just do a manual file copy to local storage and act on the data there, then, when saving, vacuum the DB then copy it back to network storage. Thanks! On Mon, Nov 12, 2012 at 2:27 PM, Simon Slavinwrote: > > On 12 Nov 2012, at 7:15pm, Stephen Chrzanowski > wrote: > > > I *KNOW* doing transactional work (Even just standard selects) can cause > > problems via a network share with SQLite due to networking `bugs` or > > whatever. My question is, does/would the backup api have the same > problem > > if I were to backup a remote file to memory or local storage, work on > data > > locally, then when needed, write back to the original location with the > > same backup mechanism? > > The backup system would work. But making any change to a database while > the backup API is being used causes its backup to restart (that's how it > works !). In other words, for the backup API to complete, no changes must > be made to the file it's backing up for a long time -- proportional to the > length of the file. > > If this happens naturally during the use of your database (you get odd > times when nothing happens for a few minutes) then your system will work. > On the other hand, if the database is under constant use (during a working > day or on a multi-user web-facing system) then your backup will never > complete until the load goes away. > > 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] VC++ and SQLite
You might be surprised at the speed increase you see in compile time if you've got large projects. The time isn't lost to CPU as much, but disk I/O time adds up when hitting many hundreds of small (header) files (even with an SSD). Doug -Original Message- From: sqlite-users-boun...@sqlite.org [mailto:sqlite-users-boun...@sqlite.org] On Behalf Of Rob Richardson Sent: Monday, November 12, 2012 1:33 PM To: General Discussion of SQLite Database Subject: Re: [sqlite] VC++ and SQLite I always turn pre-compiled headers off for every VC++ project. In my opinion, they are artifacts from a time when processors were a few hundred times slower than they are now. The benefit in time saved now is far less than the confusion they cause when something goes wrong. RobR -Original Message- From: sqlite-users-boun...@sqlite.org [mailto:sqlite-users-boun...@sqlite.org] On Behalf Of Adam DeVita Sent: Monday, November 12, 2012 10:49 AM To: General Discussion of SQLite Database Subject: Re: [sqlite] VC++ and SQLite It isn't VS2010 specific. Even going back to VS6 writing your own C++ wrapper and including the.c file you had to tell it to not use precompiled headers for that file. (Both Debug and Release builds) You should tell VS that this file will not ever be using precompiled headers. On VS2012 Professional Edition one can: Right click on the file within VS10, select Properties. Open the C/C++ tree. Select Precompiled Headers. Set Precompiled Header to Not Using Precompiled Headers. Adam On Mon, Nov 12, 2012 at 10:17 AM, John Drescherwrote: >>> I know this question is not a SQLite question, but I am hoping that >>> someone here has had a similar experience and/or can point me to the >>> right place to ask this question. >>> >>> After years or using Code::Blocks and Dev-Cpp, I have recently >>> installed Visual Studio 10 Express; it is the first time I am using >>> it, in my Windows >>> 7 machine. >>> >>> I have written, with the help of this mailing list a wrapper class >>> for the latest SQLite3 library using C::B as my development >>> platform, now that I want to switch to VS10, there were a lot of gcc >>> specific code that I had to repair and after clearing all the C++ >>> discrepancies between MinGW's g++ and MS's VC++ I have been left with this error message: >>> >>> fatal error C1853: 'Debug\sql.pch' precompiled header file is from a >>> previous version of the compiler, or the precompiled header is C++ >>> and you are using it from C (or vice versa >>> >>> >>> >>> Does anyone know how to resolve this issue or perhaps a VS10 >>> specific > > You can like the other poster said disable PCH in visual studio or > just delete all the PCH files and have VS rebuild them. The second is > what I do in Visual Studio retail versions when I get this error. > > John > ___ > sqlite-users mailing list > sqlite-users@sqlite.org > http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users -- VerifEye Technologies Inc. 905-948-0015x245 151 Whitehall Dr, Unit 2 Markham ON, L3R 9T1 Canada ___ 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] VC++ and SQLite
I always turn pre-compiled headers off for every VC++ project. In my opinion, they are artifacts from a time when processors were a few hundred times slower than they are now. The benefit in time saved now is far less than the confusion they cause when something goes wrong. RobR -Original Message- From: sqlite-users-boun...@sqlite.org [mailto:sqlite-users-boun...@sqlite.org] On Behalf Of Adam DeVita Sent: Monday, November 12, 2012 10:49 AM To: General Discussion of SQLite Database Subject: Re: [sqlite] VC++ and SQLite It isn't VS2010 specific. Even going back to VS6 writing your own C++ wrapper and including the.c file you had to tell it to not use precompiled headers for that file. (Both Debug and Release builds) You should tell VS that this file will not ever be using precompiled headers. On VS2012 Professional Edition one can: Right click on the file within VS10, select Properties. Open the C/C++ tree. Select Precompiled Headers. Set Precompiled Header to Not Using Precompiled Headers. Adam On Mon, Nov 12, 2012 at 10:17 AM, John Drescherwrote: >>> I know this question is not a SQLite question, but I am hoping that >>> someone here has had a similar experience and/or can point me to the >>> right place to ask this question. >>> >>> After years or using Code::Blocks and Dev-Cpp, I have recently >>> installed Visual Studio 10 Express; it is the first time I am using >>> it, in my Windows >>> 7 machine. >>> >>> I have written, with the help of this mailing list a wrapper class >>> for the latest SQLite3 library using C::B as my development >>> platform, now that I want to switch to VS10, there were a lot of gcc >>> specific code that I had to repair and after clearing all the C++ >>> discrepancies between MinGW's g++ and MS's VC++ I have been left with this >>> error message: >>> >>> fatal error C1853: 'Debug\sql.pch' precompiled header file is from a >>> previous version of the compiler, or the precompiled header is C++ >>> and you are using it from C (or vice versa >>> >>> >>> >>> Does anyone know how to resolve this issue or perhaps a VS10 >>> specific > > You can like the other poster said disable PCH in visual studio or > just delete all the PCH files and have VS rebuild them. The second is > what I do in Visual Studio retail versions when I get this error. > > John > ___ > sqlite-users mailing list > sqlite-users@sqlite.org > http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users -- VerifEye Technologies Inc. 905-948-0015x245 151 Whitehall Dr, Unit 2 Markham ON, L3R 9T1 Canada ___ 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] SQLite Backup via Network
On 12 Nov 2012, at 7:15pm, Stephen Chrzanowskiwrote: > I *KNOW* doing transactional work (Even just standard selects) can cause > problems via a network share with SQLite due to networking `bugs` or > whatever. My question is, does/would the backup api have the same problem > if I were to backup a remote file to memory or local storage, work on data > locally, then when needed, write back to the original location with the > same backup mechanism? The backup system would work. But making any change to a database while the backup API is being used causes its backup to restart (that's how it works !). In other words, for the backup API to complete, no changes must be made to the file it's backing up for a long time -- proportional to the length of the file. If this happens naturally during the use of your database (you get odd times when nothing happens for a few minutes) then your system will work. On the other hand, if the database is under constant use (during a working day or on a multi-user web-facing system) then your backup will never complete until the load goes away. Simon. ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
[sqlite] SQLite Backup via Network
I *KNOW* doing transactional work (Even just standard selects) can cause problems via a network share with SQLite due to networking `bugs` or whatever. My question is, does/would the backup api have the same problem if I were to backup a remote file to memory or local storage, work on data locally, then when needed, write back to the original location with the same backup mechanism? I do acknowledge the remote file can still be modified, but I can deal with that kind of condition via changing file attributes, or, renaming the remote file, or lock files, or something else. I ask this because I'm pondering on switching from flat file storage to a database infrastructure for better 'versioning' of the data contained within, but, I'll be testing on a GBit network with a minimum of two GBit switches and almost 0.01% utilization between points, however, worse case scenario thinking customer sites may still only be using 10mbit hubs or token ring. *shiver* ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
Re: [sqlite] VC++ and SQLite
It isn't VS2010 specific. Even going back to VS6 writing your own C++ wrapper and including the.c file you had to tell it to not use precompiled headers for that file. (Both Debug and Release builds) You should tell VS that this file will not ever be using precompiled headers. On VS2012 Professional Edition one can: Right click on the file within VS10, select Properties. Open the C/C++ tree. Select Precompiled Headers. Set Precompiled Header to Not Using Precompiled Headers. Adam On Mon, Nov 12, 2012 at 10:17 AM, John Drescherwrote: >>> I know this question is not a SQLite question, but I am hoping that >>> someone here has had a similar experience and/or can point me to the right >>> place to ask this question. >>> >>> After years or using Code::Blocks and Dev-Cpp, I have recently installed >>> Visual Studio 10 Express; it is the first time I am using it, in my Windows >>> 7 machine. >>> >>> I have written, with the help of this mailing list a wrapper class for the >>> latest SQLite3 library using C::B as my development platform, now that I >>> want to switch to VS10, there were a lot of gcc specific code that I had to >>> repair and after clearing all the C++ discrepancies between MinGW's g++ and >>> MS's VC++ I have been left with this error message: >>> >>> fatal error C1853: 'Debug\sql.pch' precompiled header file is from a >>> previous version of the compiler, or the precompiled header is C++ and you >>> are using it from C (or vice versa >>> >>> >>> >>> Does anyone know how to resolve this issue or perhaps a VS10 specific > > You can like the other poster said disable PCH in visual studio or > just delete all the PCH files and have VS rebuild them. The second is > what I do in Visual Studio retail versions when I get this error. > > John > ___ > sqlite-users mailing list > sqlite-users@sqlite.org > http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users -- VerifEye Technologies Inc. 905-948-0015x245 151 Whitehall Dr, Unit 2 Markham ON, L3R 9T1 Canada ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
Re: [sqlite] VC++ and SQLite
>> I know this question is not a SQLite question, but I am hoping that >> someone here has had a similar experience and/or can point me to the right >> place to ask this question. >> >> After years or using Code::Blocks and Dev-Cpp, I have recently installed >> Visual Studio 10 Express; it is the first time I am using it, in my Windows >> 7 machine. >> >> I have written, with the help of this mailing list a wrapper class for the >> latest SQLite3 library using C::B as my development platform, now that I >> want to switch to VS10, there were a lot of gcc specific code that I had to >> repair and after clearing all the C++ discrepancies between MinGW's g++ and >> MS's VC++ I have been left with this error message: >> >> fatal error C1853: 'Debug\sql.pch' precompiled header file is from a >> previous version of the compiler, or the precompiled header is C++ and you >> are using it from C (or vice versa >> >> >> >> Does anyone know how to resolve this issue or perhaps a VS10 specific You can like the other poster said disable PCH in visual studio or just delete all the PCH files and have VS rebuild them. The second is what I do in Visual Studio retail versions when I get this error. John ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
Re: [sqlite] Bug: Inconsistency wrt. indirectly defined columns
Quoting Igor Tandetnik: stahl...@dbs.uni-hannover.de wrote: SQLite's behavior makes sense, because *every* column type may be left out. However, I think that in the case of FK-definitions (like the one in 'tab2') assigning the default type is not the right thing to do. Why should one clause in the syntax behave differently depending on the presence or absence of another, unrelated clause? Sounds like an arbitrary special case to me. I think that's the main point of our disagreement. In my opinion the column type definition is very well related to the foreign-key definition: Barring more specific clauses, a column defined as a foreign key should exactly be like the primary key it references -- including data type, collation rules and any other potential modifiers. This, as I see now, collides with SQLite's view that leaving out a column type, actually means "BLOB". As no one here seems to agree with my view, I will no further pursue this. (Also I'm quite alright with specifying the column type explicitly every time.) My initial 'bug'-report now becomes a well-meant suggestion at best. :-) Thank you very much for your insight! Christian ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
Re: [sqlite] VC++ and SQLite
Remove "use precompiled header" from your configuration. On 10 November 2012 14:11, Arbol Onewrote: > I know this question is not a SQLite question, but I am hoping that > someone here has had a similar experience and/or can point me to the right > place to ask this question. > > After years or using Code::Blocks and Dev-Cpp, I have recently installed > Visual Studio 10 Express; it is the first time I am using it, in my Windows > 7 machine. > > I have written, with the help of this mailing list a wrapper class for the > latest SQLite3 library using C::B as my development platform, now that I > want to switch to VS10, there were a lot of gcc specific code that I had to > repair and after clearing all the C++ discrepancies between MinGW's g++ and > MS's VC++ I have been left with this error message: > > fatal error C1853: 'Debug\sql.pch' precompiled header file is from a > previous version of the compiler, or the precompiled header is C++ and you > are using it from C (or vice versa > > > > Does anyone know how to resolve this issue or perhaps a VS10 specific > mailing list to address this question? > > > > TIA. > > > > This e-mail is for the sole use of the intended recipient and may contain > confidential or privileged information. Unauthorized use of its contents is > prohibited. If you have received this e-mail in error, please notify sender > immediately via return e-mail and then delete the original e-mail. > > > > Let there come out of you a group of people inviting to all that is good, > enjoining what is right, and to strive against what is wrong: They are the > ones to attain respect and admiration, i.e. FSF, GTK+, *NIX, SQLite... etc. > > Eat Kosher < > http://www.hanefesh.com/edu/kosher_Food_Symbols.htm#USAD:DocumentsDownloadedInstallations> > > > > ___ > sqlite-users mailing list > sqlite-users@sqlite.org > http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users > -- Noël Frankinet Strategis sprl 0478/90.92.54 ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
Re: [sqlite] Help to create view of my data
Daniel Polski wrote: > Clemens Ladisch skrev 2012-11-09 17:00: >> SELECT 'SELECT units.id AS "unit id"' AS SQL >> UNION ALL >> SELECT ', cv' || id || '.value AS ' || quote(name) FROM configtypes >> UNION ALL >> SELECT 'FROM units JOIN unit_types ON units.unit_type_id = unit_types.id' >> UNION ALL >> SELECT 'LEFT JOIN (unittype_config JOIN configvalues' || >> ' ON unittype_config.configvalue_id = configvalues.id' || >> ' AND unittype_config.configtype_id = ' || id || ') AS cv' || id || >> ' ON unit_types.id = cv' || id || '.unit_id' FROM configtypes > > Seems interesting, but I don't understand how I use this type of > construction to create the view? It builds up the requested query, but > shows the sql query as text output (not executing it)? Yes, you have to feed the output back into SQLite; it's not possible to execute dynamic code from inside SQLite itself. As Simon said, it would be easier to just do a "SELECT id, name FROM configtypes" and construct the query in your program. (Although it would end up being the same string operations that this query does.) Anyway, it's not possible to create an _immutable_ view from that; you have to update its definition whenever the configtypes table changes. Regards, Clemens ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
Re: [sqlite] Confusion on 'foreign key mismatch' errors
On 12 Nov 2012, at 7:54am, Darren Spruellwrote: > If I'm not mistaken, that's a problem too, as type definitions are > ignored on FTS columns: Oh. You're trying to mess with a table used in an FTS definition. Okay. Don't do that unless you understand how FTS works. By all means define foreign keys on your own tables in the same database as you're using FTS, but don't do it on ones you're using FTS for. Simon. ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
Re: [sqlite] Help to create view of my data
Simon Slavin skrev 2012-11-09 17:32: In answer to the original query, my instinct is to say that you should be using your own software to collect the results of several SELECTs, not trying to do everything inside a database engine. That's an interesting point. I still think it's the most suitable solution for the particular application, but I will think about it again and try to look at it with "fresh eyes" (I might be following an old track). Thanks! /Daniel ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
Re: [sqlite] Help to create view of my data
Clemens Ladisch skrev 2012-11-09 17:00: Thanks alot for the help! :) Are you sure that the normalization hasn't gone a *little* bit too far? Yes, it makes perfect sense in other parts of the application. FOREIGN KEY( unit_id ) REFERENCES unit_types ( id ) Why is this column not called unit_type_id? It's a typeo I made when creating the example for the question I posted here, thanks for pointing it out though :) Just use SQL to generate the SQL query: SELECT 'SELECT units.id AS "unit id"' AS SQL UNION ALL SELECT ', cv' || id || '.value AS ' || quote(name) FROM configtypes UNION ALL SELECT 'FROM units JOIN unit_types ON units.unit_type_id = unit_types.id' UNION ALL SELECT 'LEFT JOIN (unittype_config JOIN configvalues' || ' ON unittype_config.configvalue_id = configvalues.id' || ' AND unittype_config.configtype_id = ' || id || ') AS cv' || id || ' ON unit_types.id = cv' || id || '.unit_id' FROM configtypes Seems interesting, but I don't understand how I use this type of construction to create the view? It builds up the requested query, but shows the sql query as text output (not executing it)? Best Regards, Daniel ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users