equal
deleted
inserted
replaced
86 __ASSERT_DEBUG(iBuf != NULL, __SQLPANIC(ESqlPanicInvalidObj)); |
86 __ASSERT_DEBUG(iBuf != NULL, __SQLPANIC(ESqlPanicInvalidObj)); |
87 __ASSERT_DEBUG(iBufType == HSqlSrvStmtParamBuf::EBufSimpleBind, __SQLPANIC(ESqlPanicInternalError)); |
87 __ASSERT_DEBUG(iBufType == HSqlSrvStmtParamBuf::EBufSimpleBind, __SQLPANIC(ESqlPanicInternalError)); |
88 iBuf->ResizeL(aData.Length()); |
88 iBuf->ResizeL(aData.Length()); |
89 iBuf->Write(0, aData); |
89 iBuf->Write(0, aData); |
90 //If the size is 0, then return KNullDesC8, where an empty string is hold, not a null one ("" instead of NULL) |
90 //If the size is 0, then return KNullDesC8, where an empty string is hold, not a null one ("" instead of NULL) |
91 return iBuf->Size() == 0 ? KNullDesC8() : iBuf->Ptr(0); |
91 // was return iBuf->Size() == 0 ? KNullDesC8() : iBuf->Ptr(0); |
|
92 if (iBuf->Size() == 0) |
|
93 { |
|
94 return KNullDesC8(); |
|
95 } |
|
96 return iBuf->Ptr(0); |
92 } |
97 } |
93 |
98 |
94 /** |
99 /** |
95 Returns a 8-bit pointer to the parameter data. |
100 Returns a 8-bit pointer to the parameter data. |
96 |
101 |
100 */ |
105 */ |
101 inline const TPtrC8 HSqlSrvStmtParamBuf::Data() const |
106 inline const TPtrC8 HSqlSrvStmtParamBuf::Data() const |
102 { |
107 { |
103 __ASSERT_DEBUG(iBuf != NULL, __SQLPANIC(ESqlPanicInvalidObj)); |
108 __ASSERT_DEBUG(iBuf != NULL, __SQLPANIC(ESqlPanicInvalidObj)); |
104 //If the size is 0, then return KNullDesC8, where an empty string is hold, not a null one ("" instead of NULL) |
109 //If the size is 0, then return KNullDesC8, where an empty string is hold, not a null one ("" instead of NULL) |
105 return iBuf->Size() == 0 ? KNullDesC8() : iBuf->Ptr(0); |
110 // was return iBuf->Size() == 0 ? KNullDesC8() : iBuf->Ptr(0); |
|
111 if (iBuf->Size() == 0) |
|
112 { |
|
113 return KNullDesC8(); |
|
114 } |
|
115 return iBuf->Ptr(0); |
106 } |
116 } |
107 |
117 |
108 /** |
118 /** |
109 @return Buffered parameter value type - binary, text8 or text16. |
119 @return Buffered parameter value type - binary, text8 or text16. |
110 */ |
120 */ |