Hi All
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.
However if i use parameters
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>"
Anyone have any ideas
Thanks
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.
B4X:
Starter.pgsql.AddNonQueryToBatch("INSERT INTO mytable (id, diary_date, location, job_number) VALUES ('29EAA55B-E9CF-BB08-1EA6-4A27DD4B9A1E' ,'2020-08-17','location', 'abcde1');",Null)
However if i use parameters
B4X:
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
"Rejecting re-init on previously-failed class java.lang.Class<org.postgresql.util.GT>"
Anyone have any ideas
Thanks