-
Notifications
You must be signed in to change notification settings - Fork 229
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
Using non-typed Null for PreparedStatement.setObject cause an error with Sybase sql server. #195
Comments
Oh we must specify java.sql.Types when using http://docs.oracle.com/javase/7/docs/api/java/sql/PreparedStatement.html#setNull(int, int) It's difficult to support this for ScalikeJDBC without reducing usability. |
I'm not sure yet. I will try the same via jtds driver instead of jconn. Second option is specify generic sql type Null. I let you know how it works on Monday when I have an access to sybase sql. |
So, I checked the case when sql.Types is not specified for null values for sybase (using origin jdbc driver and jtds), mssql and oracle. I succeed only at doing it in mssql. Oracle cursed something like this:
that means the same issue. Using sybase I tried to use Types.NULL and jtds driver for it but I had no luck either. |
That's strange. ScalikeJDBC basically works with Oracle DB though we don't support it officially. I just tried with Oracle JDBC driver 10.2.0.2 and it's surely possible to pass null value to statements. |
My fault. I was using an old jdbc driver for Oracle 9i although my server version was 10.2.0.3.0. It definetelly works for oracle. |
OK. I have no plan to support Sybase. I hope Sybase JDBC drivers will start supporting null values for #setObject in the future (as same as Oracle JDBC driver). |
btw, I've checked sybase 15.5 + jtds and it's possible to call setObject without specifying its sql type. |
Cool. I'm glad to hear that. |
hi @kalinichenko , could you please tell me how you resolved this issue with sybase.I am still struggling with that |
Hi All, I had the same issue. In sybase procedure we set as While in JAVA callable statement. how to set null by default. We tried setNull, setObject and setString but not working. Any idea please help. |
The text was updated successfully, but these errors were encountered: