I come back to this topic which is very problematic for me. The manner 
which I use permit me to read/save null values in database. But in fact, 
it's "null" string values that are stored in db. So, there is no constraint 
validation possible with that. Even worse, foreign key constraint can 
failed if you want to put a null foreign key since it's not really a null 
value....

I don't understand why query execution can take Object[] as parameter while 
it's converted to String[]. Why can't we inject object in the query and not 
string as params ???

Thanks !

On Tuesday, May 24, 2016 at 10:32:33 AM UTC+2, Jérémy MARQUER wrote:
>
> Hi,
>
> I'm facing to a problem with load/read data in database. In case of 
> integer or long column type, we can't find/update/save object with null 
> values since these methods return primitive types : 
>   /**
>      * Gets column value by index.
>      * 
>      * @param index starts with zero
>      * @return a int data from the database
>      * @throws IOException 
>      */
>     public int getInteger(int index)throws IOException;
>
>
>     /**
>      * Gets column value by index.
>      * 
>      * @param index starts with zero
>      * @return a long data from the database
>      * @throws IOException 
>      */
>     public long getLong(int index)throws IOException;
>
>
> I absolutely need to save null value in my database. 
>
> FYI, I use cn1-data-lib-access shannah's library.
>
> Thanks.
>
> If you are experiencing an issue please mention the full platform your 
> issue applies to:
> IDE: NetBeans/Eclipse/IDEA
> Desktop OS
> Simulator 
> Device
>

-- 
You received this message because you are subscribed to the Google Groups 
"CodenameOne Discussions" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to codenameone-discussions+unsubscr...@googlegroups.com.
Visit this group at https://groups.google.com/group/codenameone-discussions.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/codenameone-discussions/140f8fb0-5bc9-4252-b176-99217a2ad228%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to