jchd Posted March 18, 2020 Share Posted March 18, 2020 (edited) 45 minutes ago, Trax said: It ran for a little over 5 days and 18,000 inserts then threw and SQLite Error. Result: 1, @error: -1 on the insert command. This is actually the second time. The first time it ran a little over 4 days. That is my one problem with SQLite. The errors aren't very definitive. How do you go about trying to figure out what the error was with generic error codes like that? What is/was the return value from _SQLite_Exec() when the insert failed? If it returned 1 ($SQLITE_ERROR) that means invalid SQL or DB not open. So was the connection fine and what was the full SQL fed to _SQLite_Exec()? How many processes are using the DB at a given time? Is the DB local? Edited March 18, 2020 by jchd This wonderful site allows debugging and testing regular expressions (many flavors available). An absolute must have in your bookmarks.Another excellent RegExp tutorial. Don't forget downloading your copy of up-to-date pcretest.exe and pcregrep.exe hereRegExp tutorial: enough to get startedPCRE v8.33 regexp documentation latest available release and currently implemented in AutoIt beta. SQLitespeed is another feature-rich premier SQLite manager (includes import/export). Well worth a try.SQLite Expert (freeware Personal Edition or payware Pro version) is a very useful SQLite database manager.An excellent eBook covering almost every aspect of SQLite3: a must-read for anyone doing serious work.SQL tutorial (covers "generic" SQL, but most of it applies to SQLite as well)A work-in-progress SQLite3 tutorial. Don't miss other LxyzTHW pages!SQLite official website with full documentation (may be newer than the SQLite library that comes standard with AutoIt) Link to comment Share on other sites More sharing options...
jchd Posted March 18, 2020 Share Posted March 18, 2020 Corollary: do you sanitize data received from the devices? This wonderful site allows debugging and testing regular expressions (many flavors available). An absolute must have in your bookmarks.Another excellent RegExp tutorial. Don't forget downloading your copy of up-to-date pcretest.exe and pcregrep.exe hereRegExp tutorial: enough to get startedPCRE v8.33 regexp documentation latest available release and currently implemented in AutoIt beta. SQLitespeed is another feature-rich premier SQLite manager (includes import/export). Well worth a try.SQLite Expert (freeware Personal Edition or payware Pro version) is a very useful SQLite database manager.An excellent eBook covering almost every aspect of SQLite3: a must-read for anyone doing serious work.SQL tutorial (covers "generic" SQL, but most of it applies to SQLite as well)A work-in-progress SQLite3 tutorial. Don't miss other LxyzTHW pages!SQLite official website with full documentation (may be newer than the SQLite library that comes standard with AutoIt) Link to comment Share on other sites More sharing options...
Trax Posted March 18, 2020 Author Share Posted March 18, 2020 (edited) The Return value from the _SQLite_Exec was 1 with an @error of -1. This program is the only process accessing the DB and it is local. Sanitize? Edited March 18, 2020 by Trax Link to comment Share on other sites More sharing options...
jchd Posted March 18, 2020 Share Posted March 18, 2020 (edited) That probably means the SQL was invalid. Sanitize as in https://xkcd.com/327/ You see if by [lack of] chance your input data gets garbled and, for instance, contains a single quote in unexpected place, your whole SQL string turns invalid. Post your code. Don't worry: SQLite is very reliable and powerful, being used in gazillions devices everyday. Edited March 18, 2020 by jchd This wonderful site allows debugging and testing regular expressions (many flavors available). An absolute must have in your bookmarks.Another excellent RegExp tutorial. Don't forget downloading your copy of up-to-date pcretest.exe and pcregrep.exe hereRegExp tutorial: enough to get startedPCRE v8.33 regexp documentation latest available release and currently implemented in AutoIt beta. SQLitespeed is another feature-rich premier SQLite manager (includes import/export). Well worth a try.SQLite Expert (freeware Personal Edition or payware Pro version) is a very useful SQLite database manager.An excellent eBook covering almost every aspect of SQLite3: a must-read for anyone doing serious work.SQL tutorial (covers "generic" SQL, but most of it applies to SQLite as well)A work-in-progress SQLite3 tutorial. Don't miss other LxyzTHW pages!SQLite official website with full documentation (may be newer than the SQLite library that comes standard with AutoIt) Link to comment Share on other sites More sharing options...
dmob Posted March 18, 2020 Share Posted March 18, 2020 1 hour ago, Skysnake said: My concern with this thread is that these are very basic SQL questions. Yet very helpful for some of us, especially in filling in gaps with overall understanding and aggregation of information. I personally gain a lot from these gems. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now