B4J + Access: query INSERT

LucaMs

Expert
Licensed User
Longtime User
Simple project, simple INSERT query. Works in Debug mode, doesn't work in Release mode and doesn't report any errors :oops: (I tried ExecNonQuery inside a try-block, both with and without a transaction).

Why in the Chit Chat forum? Because I guess the description above isn't enough for you to help me, so it's just to vent my nerves a little.
 

josejad

Expert
Licensed User
Longtime User
What about removing the try-catch block to see if it throws some error?
 

OliverA

Expert
Licensed User
Longtime User
If you are using UCanAccess, then do a ExecNonQuery("COMMIT;") after any INSERT/UPDATE and see if that resolves your problem.
 

LucaMs

Expert
Licensed User
Longtime User
If you are using UCanAccess, then do a ExecNonQuery("COMMIT;") after any INSERT/UPDATE and see if that resolves your problem.
Perfect, it worked (although I don't understand why it's only needed in Release mode; I wonder if a Sleep would have been enough, I haven't tried, since the query execution is a single synchronous statement).
 

rabbitBUSH

Well-Known Member
Licensed User
If you are using UCanAccess, then do a ExecNonQuery("COMMIT;")
MMMM that might solve a similar issue I have experienced recently - where it meant doing the SQL DB change twice to effect an update.

Why in the Chit Chat forum?
ChitChat solves some problems. Its like AI for B4X . . . .
 

rabbitBUSH

Well-Known Member
Licensed User
If your intention is to hide from the members search. This is not good for sharing great information to help anyone.
ah all in jest @aeric all in jest.....
 
Top