I am having trouble with inserting into Postgresql using JdbcSQL. I can select from postgres and insert into sqlite no problem but going the other way it fails silently and doesnt show any succes tru eor false. Using postgresql-42.2.4.jre7.
If I hardcode the Values it works fine, the below code works.
Dim strSql As String = "INSERT INTO mytable (id, diary_date, location, job_number) VALUES (?,?,?,?)"
Starter.pgsql.AddNonQueryToBatch(strSql, Array(idCol, Col2, Col3, Col4))
Dim SenderFilter As Object = Starter.pgsql.ExecNonQueryBatch("SQL")
Wait For (SenderFilter) SQL_NonQueryComplete (Success As Boolean)
Log(Success)
If Success = False Then
Log(LastException)
End If
Success dosent return anything and in the unfiltered logs I get
"Rejecting re-init on previously-failed class java.lang.Class<org.postgresql.util.GT>"
using jdbcSql version 1.5. It does use appcompat but no other errors. It is a large project now, just at the last step of getting data from the device back to an inhouse database.
Have tried created a list of the parameters and using that as the args and also and as an array() but with anything othet than NUll as an arg it fails. Doesnt seem to have any menory issues, using jdbc to import several thousand records from postgres to the device but fails on trying to insert one!
Ok, thought id push on, created a new empty project without appcompat and copied the realvant parts but it has the same problem.
It will select from postgres but not insert using parameters.
First try it fails silently with no success or log message, second time it shows "Rejecting re-init on previously-failed class java.lang.Class<org.postgresql.util.GT>" in unfiltered logs.