Hello all,
I'm trying to update an Access db with a null value. The db updates fine with non-null data.
The way I understand it you have code something like this.
try
{
String update_str = "UPDATE <table> SET <field>= ?";
PreparedStatement pstmt = conn.prepareStatement(update_str);
pstmt.setNull(1,Types.NULL);
}
catch(SQLException e)
{
pritn e.getMessage();
print e.getErroCode();
print e.getSQLState();
}
which returns date like
Message -> SQLException: [Microsoft][ODBC Microsoft Access Driver]Invalid SQL data type
//possibly because Type.NULL is the proper perameter
ErrorCode -> Error Code: 67
//is this an Access error code or a JDBC and what is it?
SQLState -> SQL State: S1004
//No clue what this is
If anyone has anyclue whatsoever please let me know...thanks ahead of time.
Dan
I'm trying to update an Access db with a null value. The db updates fine with non-null data.
The way I understand it you have code something like this.
try
{
String update_str = "UPDATE <table> SET <field>= ?";
PreparedStatement pstmt = conn.prepareStatement(update_str);
pstmt.setNull(1,Types.NULL);
}
catch(SQLException e)
{
pritn e.getMessage();
print e.getErroCode();
print e.getSQLState();
}
which returns date like
Message -> SQLException: [Microsoft][ODBC Microsoft Access Driver]Invalid SQL data type
//possibly because Type.NULL is the proper perameter
ErrorCode -> Error Code: 67
//is this an Access error code or a JDBC and what is it?
SQLState -> SQL State: S1004
//No clue what this is
If anyone has anyclue whatsoever please let me know...thanks ahead of time.
Dan