Subject Re: unprofessional question
Author nagypapi
> > try{...
> > int chk=st_check.executeUpdate(toinsert); //insert into check db,
later
> > into normal db
> > if(st_normal.executeUpdate(toinsert)!=1) do all sorts of error
messages
> > and such
> > ...}catch {error messages and such}
>
> My 'quick' reaction would be - how do you know that BOTH
> st_check and st_normal have been updated. From my
> experience, it is quite possible that just occasionally the
> 'normal flow' has been interrupted, so that only the first
> insert has completed - which is exactly what you are seeing.
Hmmm...
First of all: Thank you for your answer!
I am using two different files for normal and for the check db.
Both have different connection-s that use
"org.firebirdsql.jdbc.FBDriver"
"conn_normal= DriverManager.getConnection(url+dbase_nm,sqluser,pass);"
"conn_check= DriverManager.getConnection(url+dbase_chk,sqluser,pass);"

And just before inserting the data, I create new Statements:
"Statement st_normal=conn_normal.createStatement();"
"Statement st_check=conn_check.createStatement();"

What could interrupt the normal flow? And does that mean using two
databases like this at the same time isn't safe?
(Of course the problem may reside in my code, but at the moment I
can't find anything indicating that)

> IF you need to know that records ARE missing, simply use a
> generator, and look for missing numbers. ( 'Deleted' records
> are simply retained and MARKED deleted ;) )
You are perfectly right :)
This whole project started as a learn to use SQL and JDBC thing for
me, but evolved, and now I have to root out my silliness :)