I created a small inventory management system to locate material in a warehouse by row and column. It utilizes a barcode scanner to act as a keyboard, and manages the input through a series of macros. It might not be the most elegant solution, but it works and was robust enough for our needs. I have a link to a Google Drive shared version of the folder at the bottom of this email.
However, I am having issues with data corruption/disappearance using the normal LibreOffice embedded Base set up, which I probably shouldn't have used in the first place.
I just converted to a Split Database by following the instructions here:
viewtopic.php?f=83&t=61183
https://ask.libreoffice.org/en/question ... tructions/
Once I updated the files, I am getting errors with my macros, I believe relating to the queries and possibly the WHERE clause.
When I try to update the database information using my form, I get the following error:
Code: Select all
BASIC runtime error.
An exception occurred
Type: com.sun.star.sdbc.SQLException
Message: incompatible data type in conversion
Code: Select all
RunSQL = oQuery.executeUpdate(SQLQuery)
Code: Select all
SQL = "UPDATE ""PackLocationsTable"" SET ""Previous Location"" = ""Location"", ""PreviousTimestamp"" = """ &_
"Timestamp"", ""Location"" = '" & sLocationScan & _
"', ""Timestamp"" = CURRENT_TIMESTAMP " & _
" WHERE ""PackNumber"" = '" & sPackNumber &"'"
Based on the information in this link, I see that there are concerns with using the WHERE clause in the new split database format, however I seem to be unable to find an implementation that will work with my database and macros after trying a few approaches
viewtopic.php?f=40&t=95149&p=454227&hil ... se#p454227
Could someone help me out with this update, or point me in the right direction? I built the original version of this database last year, and I am a bit rusty with my SQL.
EDIT - Villeroy pointed out the error - Dates and Timestamps are treated differently in HSQLDB 2.4.x, and I had the columns set up as Doubles, which didn't work after the update. See posts below.