-
Notifications
You must be signed in to change notification settings - Fork 16
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
PreparedStatement addBatch insert NULL into POINT column #27
Comments
Btw, |
Thanks for the precious info; I will take a look into issue (when I will back to home)
Ottieni Outlook per Android<https://aka.ms/ghei36>
…________________________________
From: Emrah Diril <notifications@github.com>
Sent: Wednesday, July 29, 2020 8:12:16 AM
To: omnisci/omnisci-jdbc <omnisci-jdbc@noreply.github.com>
Cc: Subscribed <subscribed@noreply.github.com>
Subject: Re: [omnisci/omnisci-jdbc] PreparedStatement addBatch insert NULL into POINT column (#27)
Btw, setNull with VARCHAR using execute (instead of addBatch and executeBatch) works if that helps. But I need it to work with addBatch and executeBatch.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub<#27 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/AHLFBF4X3TJL62Z373PQGRTR564UBANCNFSM4PLHRMAA>.
|
Thank you! One easy way to reproduce this problem is to modify |
I have a table with several columns one of which is a defined as
FrameCenter GEOMETRY(POINT, 4326)
so it's nullable. For some rows, I'd like to insert a NULL into this column. I'm usingaddBatch
andexecuteBatch
methods. I tried callingsetNull
with all combinations ofjava.sql.Types
. I also triedsetString
with empty string as value, but didn't work. I don't get an error when I callexecuteBatch
but my row does not get inserted into the table either.I also tried INSERT with named columns leaving out the column I'd like to insert a NULL but that didn't work either.
executeBatch
knows the full list of columns and gave me this error:executeBatch failed: Exception: TException - service has thrown: TOmniSciException(error_msg=Wrong number of columns to load into Table (4 vs 7))
So how do I insert a NULL to a Geometry Point column?
The text was updated successfully, but these errors were encountered: