Tag: cws_src680_hsqldb9 User: oj Date: 2006/08/01 23:48:52 Modified: dba/connectivity/source/commontools/dbtools2.cxx
Log: 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.16&r2=1.16.16.1 Delta lines: +14 -11 --------------------- --- dbtools2.cxx 20 Jun 2006 01:06:16 -0000 1.16 +++ dbtools2.cxx 2 Aug 2006 06:48:50 -0000 1.16.16.1 @@ -4,9 +4,9 @@ * * $RCSfile: dbtools2.cxx,v $ * - * $Revision: 1.16 $ + * $Revision: 1.16.16.1 $ * - * last change: $Author: hr $ $Date: 2006/06/20 01:06:16 $ + * last change: $Author: oj $ $Date: 2006/08/02 06:48:50 $ * * The Contents of this file are made available subject to * the terms of GNU Lesser General Public License Version 2.1. @@ -170,8 +170,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 ) @@ -183,12 +182,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]
