summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--dbaccess/source/core/api/KeySet.cxx13
1 files changed, 12 insertions, 1 deletions
diff --git a/dbaccess/source/core/api/KeySet.cxx b/dbaccess/source/core/api/KeySet.cxx
index 429ff3040cdf..0497ec322599 100644
--- a/dbaccess/source/core/api/KeySet.cxx
+++ b/dbaccess/source/core/api/KeySet.cxx
@@ -695,7 +695,18 @@ void OKeySet::executeInsert( const ORowSetRow& _rInsertRow,const OUString& i_sSQ
for(;aIter != aEnd;++aIter)
{
if ( !(_rInsertRow->get())[aIter->second.nPosition].isModified() )
- (_rInsertRow->get())[aIter->second.nPosition] = aIter->second.sDefaultValue;
+ {
+ if(aIter->second.bNullable)
+ {
+ (_rInsertRow->get())[aIter->second.nPosition].setTypeKind(aIter->second.nType);
+ (_rInsertRow->get())[aIter->second.nPosition].setNull();
+ }
+ else
+ {
+ (_rInsertRow->get())[aIter->second.nPosition] = aIter->second.sDefaultValue;
+ (_rInsertRow->get())[aIter->second.nPosition].setTypeKind(aIter->second.nType);
+ }
+ }
}
try
{