diff -r 3256212fc81f -r 826b40dcb0a8 persistentstorage/sql/SRC/Server/SqlSrvStatement.inl --- a/persistentstorage/sql/SRC/Server/SqlSrvStatement.inl Wed Aug 18 11:30:17 2010 +0300 +++ b/persistentstorage/sql/SRC/Server/SqlSrvStatement.inl Thu Sep 02 22:18:45 2010 +0300 @@ -87,7 +87,8 @@ __ASSERT_DEBUG(iBufType == HSqlSrvStmtParamBuf::EBufSimpleBind, __SQLPANIC(ESqlPanicInternalError)); iBuf->ResizeL(aData.Length()); iBuf->Write(0, aData); - return iBuf->Ptr(0); + //If the size is 0, then return KNullDesC8, where an empty string is hold, not a null one ("" instead of NULL) + return iBuf->Size() == 0 ? KNullDesC8() : iBuf->Ptr(0); } /** @@ -100,7 +101,8 @@ inline const TPtrC8 HSqlSrvStmtParamBuf::Data() const { __ASSERT_DEBUG(iBuf != NULL, __SQLPANIC(ESqlPanicInvalidObj)); - return iBuf->Ptr(0); + //If the size is 0, then return KNullDesC8, where an empty string is hold, not a null one ("" instead of NULL) + return iBuf->Size() == 0 ? KNullDesC8() : iBuf->Ptr(0); } /**