Re: [sqlite] (no subject)
Hi! Can I get some samples to work on sqlite that is how to create a database and inserting ... don' t think again I am joking plz help me.it was bit confusing when iam using sqlite command prompt Regards, Satish -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of P Kishor Sent: Friday, November 14, 2008 11:35 AM To: General Discussion of SQLite Database Subject: Re: [sqlite] (no subject) On 11/13/08, Satish <[EMAIL PROTECTED]> wrote: > Hi! > > Really I am Serious about this I am very new to database and I want > to use sqllite.so I want to know.THE Reason why asked this question is I > have seen a video of google tech bytes in that the presenter said that > sqllite doesn't support foreign key and alter table.is this True.i want to > know based on this I can proceed further. If you are serious, start with reading the documentation on sqlite.org. Check out the list of FAQs, the features, datatypes, syntax, etc. Do some background work more than just watching a video of "google tech bytes" whatever that is. Then post a well formed question on the list, with a clear subject line, and you will be promptly helped. Until then you will likely get a response equivalent to "Wtf, is this a joke? :/" > > > -Original Message- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] On Behalf Of Cory Nelson > Sent: Friday, November 14, 2008 11:22 AM > To: General Discussion of SQLite Database > Subject: Re: [sqlite] (no subject) > > On Thu, Nov 13, 2008 at 9:31 PM, Satish <[EMAIL PROTECTED]> wrote: > > Hi! > > > >Will sqllite support Foreign Key and ALTER Table Comands .I want to > know > > is there any documentation that helps me to know what are the classes that > I > > can use and program.I use vc++ to connect to database.tell me if there any > > wrapper classes which I can use and also provide me documentation about > > those clases and functions present in it and how to use them. > > > > Wtf, is this a joke? :/ > > -- > Cory Nelson ___ 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] (no subject)
Satish wrote: > Hi! > > Really I am Serious about this I am very new to database and I want > to use sqllite.so I want to know.THE Reason why asked this question is I > have seen a video of google tech bytes in that the presenter said that > sqllite doesn't support foreign key and alter table.is this True.i want to > know based on this I can proceed further. http://www.sqlite.org/lang_altertable.html http://www.sqlite.org/syntaxdiagrams.html#foreign-key-clause As for wrappers, I like Qt, but then I am biased in this regard. More seriously though, don't use a wrapper unless you want to change SQL database back ends later. You only really get portability and integration with other code related to said wrapper. -- Ian p.s. sorry for the blatant plug. ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
Re: [sqlite] (no subject)
On 11/13/08, Satish <[EMAIL PROTECTED]> wrote: > Hi! > > Really I am Serious about this I am very new to database and I want > to use sqllite.so I want to know.THE Reason why asked this question is I > have seen a video of google tech bytes in that the presenter said that > sqllite doesn't support foreign key and alter table.is this True.i want to > know based on this I can proceed further. If you are serious, start with reading the documentation on sqlite.org. Check out the list of FAQs, the features, datatypes, syntax, etc. Do some background work more than just watching a video of "google tech bytes" whatever that is. Then post a well formed question on the list, with a clear subject line, and you will be promptly helped. Until then you will likely get a response equivalent to "Wtf, is this a joke? :/" > > > -Original Message- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] On Behalf Of Cory Nelson > Sent: Friday, November 14, 2008 11:22 AM > To: General Discussion of SQLite Database > Subject: Re: [sqlite] (no subject) > > On Thu, Nov 13, 2008 at 9:31 PM, Satish <[EMAIL PROTECTED]> wrote: > > Hi! > > > >Will sqllite support Foreign Key and ALTER Table Comands .I want to > know > > is there any documentation that helps me to know what are the classes that > I > > can use and program.I use vc++ to connect to database.tell me if there any > > wrapper classes which I can use and also provide me documentation about > > those clases and functions present in it and how to use them. > > > > Wtf, is this a joke? :/ > > -- > Cory Nelson ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
Re: [sqlite] (no subject)
Hi! Really I am Serious about this I am very new to database and I want to use sqllite.so I want to know.THE Reason why asked this question is I have seen a video of google tech bytes in that the presenter said that sqllite doesn't support foreign key and alter table.is this True.i want to know based on this I can proceed further. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Cory Nelson Sent: Friday, November 14, 2008 11:22 AM To: General Discussion of SQLite Database Subject: Re: [sqlite] (no subject) On Thu, Nov 13, 2008 at 9:31 PM, Satish <[EMAIL PROTECTED]> wrote: > Hi! > >Will sqllite support Foreign Key and ALTER Table Comands .I want to know > is there any documentation that helps me to know what are the classes that I > can use and program.I use vc++ to connect to database.tell me if there any > wrapper classes which I can use and also provide me documentation about > those clases and functions present in it and how to use them. > Wtf, is this a joke? :/ -- Cory Nelson ___ 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] (no subject)
On Thu, Nov 13, 2008 at 9:31 PM, Satish <[EMAIL PROTECTED]> wrote: > Hi! > >Will sqllite support Foreign Key and ALTER Table Comands .I want to know > is there any documentation that helps me to know what are the classes that I > can use and program.I use vc++ to connect to database.tell me if there any > wrapper classes which I can use and also provide me documentation about > those clases and functions present in it and how to use them. > Wtf, is this a joke? :/ -- Cory Nelson ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
[sqlite] (no subject)
Hi! Will sqllite support Foreign Key and ALTER Table Comands .I want to know is there any documentation that helps me to know what are the classes that I can use and program.I use vc++ to connect to database.tell me if there any wrapper classes which I can use and also provide me documentation about those clases and functions present in it and how to use them. Regards, G.SATISH ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
Re: [sqlite] process blocks on sqlite3_close?
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 RanRan wrote: > In the child process, I closed the database and opened a new one for the > child process to use. Won't it fix the problem? Thank you so much again. No, because after the fork both the parent and the child have the database open. There is a lot more to a SQLite database than just a file handle (like various operating system locks and other data structures). Basically you have to sqlite3_close all databases before doing a fork (don't forget to check the result is SQLITE_OK). If you are going to immediately do an exec then you should be ok - all files/directories are opened with FD_CLOEXEC. Even if SQLite did allow forking with open databases, it would need to be notified in some way before the fork so it could prepare. Pretend the notification function is sqlite3_close :-) Also a common fear seems to be using sqlite3_open multiple times. Unless you are in a seriously constrained embedded environment there is no harm in having lots of database connections even if they are to the same file. Roger -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.9 (GNU/Linux) iEYEARECAAYFAkkdCFIACgkQmOOfHg372QS8HgCfcmHl/0GH3eWV5IMQw0bC1C1+ 8mwAn1PFLfjoK2LwGlFO2wOPwG1WFJCO =d380 -END PGP SIGNATURE- ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
Re: [sqlite] How to run the test cases (Roger Binns)
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Avinash Mittal wrote: > I think compiler is not getting tcl.h file > > Now what should be done to debug these errors Make sure the TCL development files (headers and libraries) are available. If you don't know how to do that then you need to contact support for your distribution. Roger -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.9 (GNU/Linux) iEYEARECAAYFAkkdBc8ACgkQmOOfHg372QSC8wCgr1RtLKad4sx2CZZKa/P3laPd 8DcAn3xyNYrtFlwqxzETwjbXILGqgz8q =GUPj -END PGP SIGNATURE- ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
Re: [sqlite] How to run the test cases (Roger Binns)
Hi , As suggested i did make test but it is showing errors like: test1.c:(.text+0x390): undefined reference to `Tcl_CreateCommand' test1.c:(.text+0x3b8): undefined reference to `Tcl_CreateObjCommand' test1.c:(.text+0x3d4): undefined reference to `Tcl_LinkVar' test1.c:(.text+0x3e8): undefined reference to `Tcl_LinkVar' test1.c:(.text+0x3fc): undefined reference to `Tcl_LinkVar' test1.c:(.text+0x410): undefined reference to `Tcl_LinkVar' test1.c:(.text+0x424): undefined reference to `Tcl_LinkVar' /tmp/ccnlfRA9.o:test1.c:(.text+0x438): more undefined references to `Tcl_LinkVar' follow /tmp/ccnlfRA9.o: In function `test_printf': test1.c:(.text+0x688): undefined reference to `Tcl_AppendResult I think compiler is not getting tcl.h file Now what should be done to debug these errors Regards Avinash ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
Re: [sqlite] process blocks on sqlite3_close?
Roger Binns wrote: > > -BEGIN PGP SIGNED MESSAGE- > Hash: SHA1 > > RanRan wrote: >> I have a program that would create a child process. > > http://www.sqlite.org/faq.html > > Question 6, last paragraph. > > Roger > -BEGIN PGP SIGNATURE- > Version: GnuPG v1.4.9 (GNU/Linux) > > iEYEARECAAYFAkkc+lYACgkQmOOfHg372QQOWgCeLkoxrDl8Xt3+wqIlGofUNxeA > 8cIAoMtwi03Clvepc8bv1YSR2dwuGxxN > =MPNx > -END PGP SIGNATURE- > ___ > sqlite-users mailing list > sqlite-users@sqlite.org > http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users > > Thanks for the fast reply. I haven't read that part so thank you really for sending the link to me. I just have one more question if its OK. In the child process, I closed the database and opened a new one for the child process to use. Won't it fix the problem? Thank you so much again. -- View this message in context: http://www.nabble.com/process-blocks-on-sqlite3_close--tp20493813p20494723.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] Mailing Request
[EMAIL PROTECTED] Regards, G.Satish ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
Re: [sqlite] process blocks on sqlite3_close?
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 RanRan wrote: > I have a program that would create a child process. http://www.sqlite.org/faq.html Question 6, last paragraph. Roger -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.9 (GNU/Linux) iEYEARECAAYFAkkc+lYACgkQmOOfHg372QQOWgCeLkoxrDl8Xt3+wqIlGofUNxeA 8cIAoMtwi03Clvepc8bv1YSR2dwuGxxN =MPNx -END PGP SIGNATURE- ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
[sqlite] process blocks on sqlite3_close?
Hi everyone! I have a program that would create a child process. The run-through of the part of the program is as follows: [code] int main() { pid_t pid; int status = -1; static sqlite3 *dbPtr; status = sqlite3_open( "mine.db", dbPtr ); while(1) { if((pid = fork()) == 0) { printf("before closing parent db copy"); sqlite3_close(dbPtr); dbPtr = NULL; printf("after closing parent db copy"); status = sqlite3_open("mine.db", dbPtr); if(status == SQLITE_OK) { // do some db queries here sqlite3_close(dbPtr); } } sleep(5); } return(0); } [/code] Kindly take note of the sqlite3_close between the printings. I put it there for the reason that when a new process is forked, it creates a new dbPtr as a copy of the parent's dbPtr. I closed it then and opened so that the child can have its own session of sqlite transactions. However when I run the program for several hours, it would just print "before closing parent db copy". And when i issue a ps command, there are already 2 instances of the program running (1 parent and 1 child). And the child is now running for an hour or so. So if that is the case, maybe there is something in sqlite3_close that lets the child process to halt. Im not sure though. Any inputs will be greatly appreciated. Thank you so much! -- View this message in context: http://www.nabble.com/process-blocks-on-sqlite3_close--tp20493813p20493813.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] UPDATE - to simplify the code...
"Ernany" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Is it possible to simplify the code? I have ten fields to UPDATE. > (STATUS, Responsavel, Country,..) > > UPDATE Bens SET *STATUS *= > CASE (SELECT COUNT(BENSBK.STATUS) FROM BENSBK WHERE BENSBK.BEM = > Bens.BEM) > WHEN 0 THEN Bens.STATUS > ELSE (SELECT BENSBK.STATUS FROM BENSBK WHERE BENSBK.BEM = Bens.BEM) > END [similar statements snipped] Try this: update Bens set STATUS=coalesce( (SELECT BENSBK.STATUS FROM BENSBK WHERE BENSBK.BEM = Bens.BEM), STATUS), set Responsavel=coalesce( (SELECT BENSBK.Responsavel FROM BENSBK WHERE BENSBK.BEM = Bens.BEM), Responsavel), set Country=coalesce( (SELECT BENSBK.Country FROM BENSBK WHERE BENSBK.BEM = Bens.BEM), Country); Igor Tandetnik ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
[sqlite] Unicode Character
Hi All, We have a field of datatype nvarchar in SQL Server 2005, which stores the data in unicode. When I export the data into SQLite, it is storing as ascii, even if I change the datatype as nvarchar when the table is created. I am using SQL Maestro tool to export the data from SQL Server to SQLite. Database format is UTF-8. Please let me know, some suggestions about how to solve this issue. My advance thanks to all. Thanks Baskaran _ Windows Live Hotmail now works up to 70% faster. http://windowslive.com/Explore/Hotmail?ocid=TXT_TAGLM_WL_hotmail_acq_faster_112008 ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
Re: [sqlite] How to Modify Table
Slater, Chad wrote: > > Sqlite does not support modifying the unique constraints on a table: > > http://www.sqlite.org/lang_altertable.html > > So you probably need to do it the 'ol fashioned way: > Perfect--Just what I figured I'd need to do! Thanks! -- View this message in context: http://www.nabble.com/How-to-Modify-Table-tp20474500p20487732.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] How to Modify Table
Sqlite does not support modifying the unique constraints on a table: http://www.sqlite.org/lang_altertable.html So you probably need to do it the 'ol fashioned way: BEGIN; CREATE TABLE Vehicles_new ( VehicleID INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, FK_CustomerID INTEGER NOT NULL, VehicleNumber INTEGER NOT NULL, VehicleTitle TEXT, VehicleMake TEXT, VehicleModel TEXT, VehicleYear TEXT, VehicleVIN TEXT, VehicleDescription TEXT, Active INTEGER DEFAULT 1 NOT NULL, CreateDate DATE DEFAULT (date('now','localtime')) NOT NULL, UNIQUE (FK_CustomerID, VehicleID)); INSERT INTO Vehicles_new SELECT * FROM Vehicles; DROP TABLE Vehicles; ALTER TABLE Vehicles_new RENAME TO Vehicles; COMMIT TRANSACTION; -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of jonwood Sent: Wednesday, November 12, 2008 8:08 PM To: sqlite-users@sqlite.org Subject: [sqlite] How to Modify Table My database contains the following table: m_Database.ExecNonQuery(_T("CREATE TABLE Vehicles (") _T("VehicleID INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL,") _T("FK_CustomerID INTEGER NOT NULL,") _T("VehicleNumber INTEGER NOT NULL,") _T("VehicleTitle TEXT,") _T("VehicleMake TEXT,") _T("VehicleModel TEXT,") _T("VehicleYear TEXT,") _T("VehicleVIN TEXT,") _T("VehicleDescription TEXT,") _T("Active INTEGER DEFAULT 1 NOT NULL,") _T("CreateDate DATE DEFAULT (date('now','localtime')) NOT NULL,") _T("UNIQUE (FK_CustomerID, VehicleID))")); I would like to change the last line to instead be: _T("UNIQUE (FK_CustomerID, VehicleNumber))")); Is there any way to make this change to the existing table without losing data in the table? Thanks for any suggestions! -- View this message in context: http://www.nabble.com/How-to-Modify-Table-tp20474500p20474500.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] SQLite Import Tool
Thanks you all for your support. Finally, I was able to make SQLMaestro work. Thanks once again Baskaran> Date: Thu, 13 Nov 2008 10:14:14 -0500> From: [EMAIL PROTECTED]> To: sqlite-users@sqlite.org> Subject: Re: [sqlite] SQLite Import Tool> > Here is a link to the application and source:> > http://www.proghack.net/?p=40> > On Wed, Nov 12, 2008 at 3:20 PM, Baskaran Selvaraj <> [EMAIL PROTECTED]> wrote:> > >> > Thanks roosevelt. I will try to use the c# command.> >> > > Date: Wed, 12 Nov 2008 15:03:41 -0500> From:> > [EMAIL PROTECTED]> To: sqlite-users@sqlite.org> Subject: Re:> > [sqlite] SQLite Import Tool> > I wrote a simple c# command line program that> > will import data from> MSSQL into a sqlite database. You specify a query> > (for MSSQL), a> connection string, the location of the sqlite database file,> > and a> table in the sqlite database and the app dumps the results of the>> > query into the table. You could easily use it in a batch file to> accomplish> > what you need. If you want the app, I could send it to you.> > On Wed, Nov> > 12, 2008 at 9:45 AM, Baskaran Selvaraj> <[EMAIL PROTECTED]>> > wrote:> >> >> > Hi All,> > This is Baskaran and I am looking for a vendor> > tool to automate the import process.> > We have an application which is> > written to use SQLite database. Right now, I import the data> > into SQLite> > database from SQL Server 2005 manually. Looking for a vendor software, which> > can used> > to automate the process of importing the data from SQL Server> > 2005 to SQLite database> > on a daily basis> > .> > Thanks> > Baskaran> > Selvaraj, DBA> >> >> > _> > See how> > Windows(R) connects the people, information, and fun that are part of your> > life> > http://clk.atdmt.com/MRT/go/119463819/direct/01/> >> > ___> > 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> > _> > Windows Live Hotmail now works up to 70% faster.> >> > http://windowslive.com/Explore/Hotmail?ocid=TXT_TAGLM_WL_hotmail_acq_faster_112008> > ___> > 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 _ See how Windows® connects the people, information, and fun that are part of your life http://clk.atdmt.com/MRT/go/119463819/direct/01/ ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
[sqlite] UPDATE - to simplify the code...
Hello , Is it possible to simplify the code? I have ten fields to UPDATE. (STATUS, Responsavel, Country,..) Thanks, Ernany ** UPDATE Bens SET *STATUS *= CASE (SELECT COUNT(BENSBK.STATUS) FROM BENSBK WHERE BENSBK.BEM = Bens.BEM) WHEN 0 THEN Bens.STATUS ELSE (SELECT BENSBK.STATUS FROM BENSBK WHERE BENSBK.BEM = Bens.BEM) END UPDATE Bens SET *Responsavel *= CASE (SELECT COUNT(BENSBK.Responsavel) FROM BENSBK WHERE BENSBK.BEM = Bens.BEM) WHEN 0 THEN Bens.Responsavel ELSE (SELECT BENSBK.Responsavel FROM BENSBK WHERE BENSBK.BEM = Bens.BEM) END UPDATE Bens SET *Country *= CASE (SELECT COUNT(BENSBK.Country ) FROM BENSBK WHERE BENSBK.BEM = Bens.BEM) WHEN 0 THEN Bens.Country ELSE (SELECT BENSBK.Country FROM BENSBK WHERE BENSBK.BEM = Bens.BEM) END ** ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
Re: [sqlite] sqlite insert and delete statements not succeed
hi, Doug, Thanks for your reply, I have just fixed that bug, the issue caused by not closing database correctly, so next time I opened the database, all things rolling back. Thanks for your patience and passion. best regards On Thu, 2008-11-13 at 09:48 -0500, Doug Currie wrote: > On Nov 12, 2008, at 10:31 PM, henry wrote: > > > my app, I opened a database handler, insert some records, delete some > > records, then closed the database handler. The problem is the next > > time > > when I connect the Sqlite, the actions I did last time has all gone > > away, it did not take any effect to the database. There's no error > > code > > when using the sqlite api, and if I use that handler to query the > > database, the inserted data is there. > > What filename did you give to sqlite3_open? > > Do you see that file being created by your app? > > Is it modified (does the file modified time or size change) when your > app runs? > > e > > ___ > 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] ANN: SQLite Maestro 8.11 released (database encryption support and other features)
Hi! SQL Maestro Group announces the release of SQLite Maestro 8.11, a complete Windows GUI solution for SQLite database management. The new version is immediately available at http://www.sqlmaestro.com/products/sqlite/maestro/ What's new in this version === 1. Support for transparent database encryption has been implemented. It is possible to use SQLite Encryption Extension by Hwaci (if you have it) or a free wxSQLite3 library. 2. Remote database management has been significantly updated. Now you can connect to remote SQLite 3 databases as well as store the connection script in a password protected directory. 3. Starting with this version it is possible to use the lookup editor for a column, which is linked by a foreign key with a (single) column from another table. The editor displays the contents of parent table's columns within the dropdown window. 4. A possibility of displaying data in the master-detail form has been incorporated into the Table Editor (multiple detail pages can be displayed for a single master row). 5. Filtering, grouping, and sorting features become available for TEXT columns. 6. Data Import Wizard: now it is possible to truncate the table before importing. 7. Get SQL Dump Wizard and Extract Database Wizard have been redesigned to increase the usability. 8. Data Export, Data Import, and Get SQL Dump wizards now store their size and position. 9. Some other minor improvements and corrections. Full press release: http://www.sqlmaestro.com/news/company/5570/ Background information: SQL Maestro Group is engaged in developing complete database admin and management tools for MySQL, Oracle, MS SQL Server, PostgreSQL, SQLite, DB2, Firebird, SQL Anywhere and MaxDB providing the highest performance, scalability and reliability to meet the requirements of today's database applications. Sincerely yours, The SQL Maestro Group Team http://www.sqlmaestro.com ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
Re: [sqlite] FTS 3 Crash in 3.6.5
Shawn Wilsher wrote: >I seem to have found a crash that is 100% reproducible in SQLite 3.6.5. I'm >managed to make a reduced test case in a C file that can be found here: >http://files.shawnwilsher.com/2008/11/12/test.c I could reproduce the problem and opened this ticket to make sure it does not get overlooked: http://www.sqlite.org/cvstrac/tktview?tn=3497 Ralf ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
Re: [sqlite] SQLite Import Tool
Here is a link to the application and source: http://www.proghack.net/?p=40 On Wed, Nov 12, 2008 at 3:20 PM, Baskaran Selvaraj < [EMAIL PROTECTED]> wrote: > > Thanks roosevelt. I will try to use the c# command. > > > Date: Wed, 12 Nov 2008 15:03:41 -0500> From: > [EMAIL PROTECTED]> To: sqlite-users@sqlite.org> Subject: Re: > [sqlite] SQLite Import Tool> > I wrote a simple c# command line program that > will import data from> MSSQL into a sqlite database. You specify a query > (for MSSQL), a> connection string, the location of the sqlite database file, > and a> table in the sqlite database and the app dumps the results of the> > query into the table. You could easily use it in a batch file to> accomplish > what you need. If you want the app, I could send it to you.> > On Wed, Nov > 12, 2008 at 9:45 AM, Baskaran Selvaraj> <[EMAIL PROTECTED]> > wrote:> >> >> > Hi All,> > This is Baskaran and I am looking for a vendor > tool to automate the import process.> > We have an application which is > written to use SQLite database. Right now, I import the data> > into SQLite > database from SQL Server 2005 manually. Looking for a vendor software, which > can used> > to automate the process of importing the data from SQL Server > 2005 to SQLite database> > on a daily basis> > .> > Thanks> > Baskaran > Selvaraj, DBA> >> > > _> > See how > Windows(R) connects the people, information, and fun that are part of your > life> > http://clk.atdmt.com/MRT/go/119463819/direct/01/> > > ___> > 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 > _ > Windows Live Hotmail now works up to 70% faster. > > http://windowslive.com/Explore/Hotmail?ocid=TXT_TAGLM_WL_hotmail_acq_faster_112008 > ___ > 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] Problems using AUTOINCREMENT row IDs in indexes
I'm having problems getting good index choice in SQLite 3.6.4 for a field which is INTEGER PRIMARY KEY AUTOINCREMENT. I've got the following table: CREATE TABLE Signals (sSignalID Text DEFAULT '',sText Text DEFAULT '',sTime Text DEFAULT '',sUserID Text DEFAULT '',nRowID INTEGER PRIMARY KEY AUTOINCREMENT DEFAULT '0'); with index: CREATE UNIQUE INDEX idxUserID ON Signals (sUserID, nRowID); In my test cases I've got around 2 million records in the table, with only 6 or so sUserID values. In practice there will be thousands of distinct sUserID values. This query: SELECT * FROM Signals WHERE sUserID='[EMAIL PROTECTED]' AND nRowID >= 1932308 and nRowID <= 1932508 takes 380 ms to execute. If I do this: ALTER TABLE Signals ADD COLUMN nRowID2 INTEGER UPDATE Signals SET nRowID2 = nRowID CREATE UNIQUE INDEX idxUserID2 ON Signals (sUserID, nRowID2); and run this: SELECT * FROM Signals WHERE sUserID='[EMAIL PROTECTED]' AND nRowID2 >= 1932308 and nRowID2 <= 1932508 it takes 1 ms. I get similar results for this sort of query - a dramatic speedup when using the clone field nRowID2: SELECT * FROM Signals WHERE sUserID='[EMAIL PROTECTED]' AND nRowID < 100 ORDER BY nRowID DESC LIMIT 100 Looking at the query plans it appears that the nRowID queries aren't exploiting the fact that nRowID is in the index idxUserID. That index is used, but there is no seek using the nRowID as well as the sUserID. Why should the fact that the nRowID field is INTEGER PRIMARY KEY AUTOINCREMENT prevent it from being used properly in query index selection? How can I get AUTOINCREMENT behaviour as well as good index selection? Is this an SQLite bug? Hugh ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
[sqlite] (no subject)
I am resending my transactions based on the result code that is returned. Should I put the time out command in my loops or once set does time out apply to each transaction despite the resends? And does the timeout command apply only to connecting to the data base or to each request? ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
Re: [sqlite] sqlite insert and delete statements not succeed
On Nov 12, 2008, at 10:31 PM, henry wrote: > my app, I opened a database handler, insert some records, delete some > records, then closed the database handler. The problem is the next > time > when I connect the Sqlite, the actions I did last time has all gone > away, it did not take any effect to the database. There's no error > code > when using the sqlite api, and if I use that handler to query the > database, the inserted data is there. What filename did you give to sqlite3_open? Do you see that file being created by your app? Is it modified (does the file modified time or size change) when your app runs? e ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
Re: [sqlite] Program crashes when delete a row in SQLite db table
Hello Nithin, Thursday, November 13, 2008, 12:15:57 AM, you wrote: NJ> Hi, NJ> The problem is that the process is crashing without giving me a NJ> chance to detect the error and recover from the situation. How can I NJ> prevent that? NJ> How can I programatically find out the the corrupted rows? If I can NJ> find these rows I can work around them. NJ> Thanks in advance NJ> Nithin NJ> ___ NJ> sqlite-users mailing list NJ> sqlite-users@sqlite.org NJ> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users Well, in windows you can use "Structured exception handling" to catch crashes before they take out your program. In my program, I do an integrity check on many DB's before I use them. I consider a damaged DB to be a fatal error so, I rename and open a new one. Most of the data I store though isn't mission critical. I use SEH try catch blocks around the more dangerous code in my program. -- Best regards, Tegmailto:[EMAIL PROTECTED] ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
Re: [sqlite] Query Sqlite lock state
Igor Tandetnik wrote: > "Marcus Grimm" <[EMAIL PROTECTED]> wrote > in message news:[EMAIL PROTECTED] >> is there a way to query if the database file is currently locked ? > > How would it help? Between the time you would obtain this information, > and the time you could act on it, the answer may very well change. yes, you are right. good point > > Just try whatever operation you need to perform, and check for failure. or probably by using a transaction as well, as JS suggested, anyway, I'll try Thanks for the feedback Marcus > > Igor Tandetnik > > > > ___ > 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] Query Sqlite lock state
John Stanton wrote: > How about performing your backup inside an exlclusive transaction? hm, good idea! ;) Probably that will lock the file (i.e. the database) and protect from a FileCopy, anyway: I'll try that. Thanks for the reply Marcus > > Marcus Grimm wrote: >> Hello all, >> >> is there a way to query if the database file is currently locked ? >> >> Background: >> My application may run for weeks (hopefully) and uses EXCLUSIVE >> transactions in some threads. On a daily basis I would like to copy >> the database file for backup purpose. I assume that this will fail >> when there is an exclusive transaction ongoing. It would be more >> elegant to ask sqlite rather than test against a FileCopy failure. >> >> I found the "PRAGMA locking_mode" statement, is this the one to use ? >> >> Thank you >> >> Marcus >> >> ___ >> 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] Query Sqlite lock state
"Marcus Grimm" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > is there a way to query if the database file is currently locked ? How would it help? Between the time you would obtain this information, and the time you could act on it, the answer may very well change. Just try whatever operation you need to perform, and check for failure. Igor Tandetnik ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
Re: [sqlite] Query Sqlite lock state
How about performing your backup inside an exlclusive transaction? Marcus Grimm wrote: > Hello all, > > is there a way to query if the database file is currently locked ? > > Background: > My application may run for weeks (hopefully) and uses EXCLUSIVE > transactions in some threads. On a daily basis I would like to copy > the database file for backup purpose. I assume that this will fail > when there is an exclusive transaction ongoing. It would be more > elegant to ask sqlite rather than test against a FileCopy failure. > > I found the "PRAGMA locking_mode" statement, is this the one to use ? > > Thank you > > Marcus > > ___ > 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 Import Tool
has any one expressed an interest to help out? it does not seem to be all that difficult, notwithstanding your mention of time-out issues. please let me know a bit ore detail about the db you are exporting, and we can see if it is a project we can do quickly for you. thanks- Keith T the SLK Groups On Wednesday 12 November 2008 11:30:48 Baskaran Selvaraj wrote: > Thanks. SQLite ODBC driver takes hours for data transfer and most of the > time it is not success. > > > Date: Wed, 12 Nov 2008 12:56:19 -0200> From: [EMAIL PROTECTED]> > > To: sqlite-users@sqlite.org> Subject: Re: [sqlite] SQLite Import Tool> > > > Hi> > You can use SQLite ODBC Driver and SQL Management Studio Data > > Transfer> Wizard to perform this action.> > On Wed, Nov 12, 2008 at 12:45 > > PM, Baskaran Selvaraj <> [EMAIL PROTECTED]> wrote:> > >> >> > Hi > > All,> > This is Baskaran and I am looking for a vendor tool to automate > > the import> > process.> > We have an application which is written to use > > SQLite database. Right now,> > I import the data> > into SQLite database > > from SQL Server 2005 manually. Looking for a vendor> > software, which > > can used> > to automate the process of importing the data from SQL Server > > 2005 to> > SQLite database> > on a daily basis> > .> > Thanks> > Baskaran > > Selvaraj, DBA> >> > > > _> > See > > how Windows(R) connects the people, information, and fun that are part > > of> > your life> > http://clk.atdmt.com/MRT/go/119463819/direct/01/> > > > ___> > 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 > > _ > See how Windows® connects the people, information, and fun that are part of > your life http://clk.atdmt.com/MRT/go/119463819/direct/01/ > ___ > 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] Query Sqlite lock state
Hello all, is there a way to query if the database file is currently locked ? Background: My application may run for weeks (hopefully) and uses EXCLUSIVE transactions in some threads. On a daily basis I would like to copy the database file for backup purpose. I assume that this will fail when there is an exclusive transaction ongoing. It would be more elegant to ask sqlite rather than test against a FileCopy failure. I found the "PRAGMA locking_mode" statement, is this the one to use ? Thank you Marcus ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users