I have an issue with storing uniqueidentifier column in Database using prepared statement.
Am using postgre sql database, in postgres we have one uniqueidentifier column type and am using it.
while inserting uniqueidentifier column as string or object using prepared statement it is throwing exception like
here is the sample code :
if the column type is string/int/object i can able to store using prepared statement, but because of uniqueidentifier type am not able to insert into DB.
Could anyone of please give me some idea how to do it using JDBC.
I really appriciate if anyone having any suggestion.
I went through this yesterday for Timestamps. (postgresql is WAY to picky with types.) I haven't had occasion to try for Unique Ids but searched and found this. The suggestion is to use setObject which sounds reasonable.