User: vg Date: 2006/09/25 02:42:08 Modified: dba/connectivity/source/commontools/dbtools2.cxx
Log: INTEGRATION: CWS hsqldb9 (1.16.16); FILE MERGED 2006/08/03 06:17:25 oj 1.16.16.2: RESYNC: (1.16-1.17); FILE MERGED 2006/08/02 06:48:50 oj 1.16.16.1: correct handling for timestamp types and scale File Changes: Directory: /dba/connectivity/source/commontools/ ================================================ File [changed]: dbtools2.cxx Url: http://dba.openoffice.org/source/browse/dba/connectivity/source/commontools/dbtools2.cxx?r1=1.18&r2=1.19 Delta lines: +11 -8 -------------------- --- dbtools2.cxx 17 Sep 2006 02:03:13 -0000 1.18 +++ dbtools2.cxx 25 Sep 2006 09:42:05 -0000 1.19 @@ -173,8 +173,7 @@ sTypeName = sTypeName.replaceAt(nIndex,sTypeName.getLength() - nIndex,::rtl::OUString()); } - - if ( nPrecision > 0 && bUseLiteral ) + if ( (nPrecision > 0 || nScale > 0) && bUseLiteral ) { sal_Int32 nParenPos = sTypeName.indexOf('('); if ( nParenPos == -1 ) @@ -186,12 +185,16 @@ { aSql += sTypeName.copy(0,++nParenPos); } + + if ( nPrecision > 0 && nDataType != DataType::TIMESTAMP ) + { aSql += ::rtl::OUString::valueOf(nPrecision); if ( nScale > 0 ) - { aSql += ::rtl::OUString::createFromAscii(","); - aSql += ::rtl::OUString::valueOf(nScale); } + if ( nScale > 0 || nDataType == DataType::TIMESTAMP ) + aSql += ::rtl::OUString::valueOf(nScale); + if ( nParenPos == -1 ) aSql += ::rtl::OUString::createFromAscii(")"); else --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
