diff -r 3da531bb4329 -r 28839de615b4 persistentstorage/sql/SRC/Server/SqlSrvStatement.inl --- a/persistentstorage/sql/SRC/Server/SqlSrvStatement.inl Mon Jun 21 17:37:53 2010 +0300 +++ b/persistentstorage/sql/SRC/Server/SqlSrvStatement.inl Thu Aug 19 11:36:21 2010 +0300 @@ -87,7 +87,8 @@ __SQLASSERT(iBufType == HSqlSrvStmtParamBuf::EBufSimpleBind, 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 { __SQLASSERT(iBuf != NULL, 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); } /**