Ask Your Question

Error Message Code 40

asked 2016-07-31 19:07:02 +0100

Britannicus gravatar image

updated 2016-07-31 20:23:56 +0100

Ratslinger gravatar image

hi I'm trying to create a simple DB of Images - I set up a simple table using the Image field - the table is watch pic table. and has only 3 values - 2 integer (watch ID and an auto value for the index )and 1 image field

I created an input form and started to enter pictures - At first it works fine , then after about 5 new entires or so the whole shebang freezes and I have to ditch the application - the error message shown below in full at teh bottom

what' s going on here - i just want a simple DB to store pictures and data about watches.

SQL Status: S1000 Error code: 40

S1000 General error java.lang.NullPointerException in statement [INSERT INTO "Watch Pic table" ( "watch id","watch picture") VALUES ( ?,?)]

edit retag flag offensive close merge delete

2 Answers

Sort by » oldest newest most voted

answered 2016-07-31 20:21:15 +0100

Ratslinger gravatar image

Pictures occupy a large amount of space. Working with an embedded DB (LO default) has problems with large amounts of data and potential data loss. This comes from the uncompressing and compressing of the .odb file whenever opening or closing the Base file. You can avoid this by creating a split database - one where the data is separated from the rest of the Base info. This avoids a lot of problems. (see this link on creating a split DB - click here). Using this method will eliminate the problem you are having but will still create a large .lobs file to hold the pictures.

Another option is to use a table to point to the pictures instead of storing the entire picture in the DB. This saves a lot of space and you can still use the embedded DB (although I always recommend to use a split DB for the previously mentioned reason). You can find information and a sample on this post: click here. The example is helpful. Using this method will also load and save your images much quicker.

edit flag offensive delete link more

answered 2016-08-01 15:39:21 +0100

Britannicus gravatar image

Thank you very much I shall try this out - I had wondered if it was due to file size but was surprised that this happened after only about 10 Mb of files

edit flag offensive delete link more
Login/Signup to Answer

Question Tools

1 follower


Asked: 2016-07-31 19:07:02 +0100

Seen: 178 times

Last updated: Aug 01 '16