Robert,
 
The url at following posting http://www.nabble.com/%27VARCHAR%27-from-a-data-value-of-type-%270%27-tf1889164.html#a5165681  had same problem and it was resolved by sending the type id as java.sql.Types.VARCHAR in setNull() method.
 
Mamta

 
On 9/6/06, Robert Enyedi <robert.enyedi@intland.com> wrote:
I have an application that runs on Derby with the network JDBC driver.
When I switch to the embedded JDBC driver my aplication fails because I
receive the following exception when inserting a NULL value in a VARCHAR
field:

"An attempt was made to get a data value of type 'VARCHAR' from a data
value of type '0'."

Did anyone encounter such a strange error?

Regards,
Robert