[Solved] Problem committing database from VStudio

Discuss the database features

[Solved] Problem committing database from VStudio

Postby pdoggeth » Wed Feb 07, 2018 9:42 pm

Hello all,

I did a search on this topic, but it did not quite yield the results I'm looking for.

Let me briefly give the run down on my issue. I'm writing an application using Visual Basic 2010, using a database through OO base connection. The connection, DB queries, and DB updates all work properly. However, when I quit my application, the DB results don't seem to actually be committed properly. If I manually open up the DB or restart my application, yes all changes have been committed.

However, let's say I am running my application, make some DB changes, then exit, and then restart my computer. Upon restart, if I open up my application or the DB directly, all changes I have made were NOT committed and have been lost.

This is true even when I manually force a commit with "Connection.commit()" . When I exit my application, I am properly closing the connections as well.

Is there something I'm missing? Any help would be appreciated. Thank you!
Last edited by pdoggeth on Thu Feb 08, 2018 1:45 am, edited 1 time in total.
OpenOffice 3.3 on Windows 7
pdoggeth
 
Posts: 3
Joined: Wed Feb 07, 2018 9:34 pm

Re: Problem committing database from VStudio

Postby eremmel » Wed Feb 07, 2018 11:16 pm

What database are you using? Do you shut down your database before restarting your computer?
You state that you are using Visual Basic 2010, that is a microsoft product, normally this integrates not well with Apache Open Office.
Is your question answered: edit your initial post add "[Solved]" to the subject and check V
LO4.2.8.2 for real life with ORB; AOO4.1.3,LO5.2.5.1 on W7E SP1 64bit
It's Microsoft marketing that tells you computers are qualified for non-technicians
User avatar
eremmel
Volunteer
 
Posts: 976
Joined: Tue Dec 30, 2008 1:15 am
Location: Barneveld, Netherlands

Re: Problem committing database from VStudio

Postby pdoggeth » Wed Feb 07, 2018 11:30 pm

I'm using open office base as my DB.

Yup, I'm closing the DB properly.

However, I think I may know what's going on (go figure, it happens after I post). While I am closing the connection and closing the DB properly, there is another possibility that something else is causing my application to not close properly. As to why that would affect OO from ending the DB portion successfully, I don't know why, but it might be related to what's going on with my situation. I'll be doing a little more work on this.
OpenOffice 3.3 on Windows 7
pdoggeth
 
Posts: 3
Joined: Wed Feb 07, 2018 9:34 pm

Re: Problem committing database from VStudio

Postby pdoggeth » Thu Feb 08, 2018 1:45 am

Ok I have done a bit of testing, and I have found the culprit:

The reason the DB is not committing is (oddly) because my program was hanging up upon exit during my testing phase. My application tries to connect to a specific USB device, but during my testing phase with integrating with OO Base, I did not connect to the USB device to save time during development (the USB device is a large Meter). This would cause the application to hang upon exit.

The odd thing is that I would call the deinitialization procedure for Open Office BEFORE trying to hang up with the USB device, so it definitely closed both Connect and also closed the object. Regardless, that hangup with the USB device caused the non-commit issue. When I brought over the USB device, everything worked properly.

I guess the morale of this story is to make sure you gracefully close out your entire application even though it's seemingly not related to Open Office.
OpenOffice 3.3 on Windows 7
pdoggeth
 
Posts: 3
Joined: Wed Feb 07, 2018 9:34 pm


Return to Base

Who is online

Users browsing this forum: No registered users and 4 guests