Tag: cws_src680_sqlite User: aklitzing Date: 2006/08/18 18:42:48 Modified: dba/connectivity/source/drivers/sqlite3/sqDatabaseMetaData.cxx dba/connectivity/source/drivers/sqlite3/sqDB.cpp dba/connectivity/source/drivers/sqlite3/sqDB.h dba/connectivity/source/drivers/sqlite3/sqQueryPrepared.cpp dba/connectivity/source/drivers/sqlite3/sqQueryPrepared.h dba/connectivity/source/drivers/sqlite3/sqResultSet.cxx dba/connectivity/source/drivers/sqlite3/sqResultSetMetaData.cxx dba/connectivity/source/drivers/sqlite3/sqStatement.cxx
Log: * UTF-16 support added * some fixes File Changes: Directory: /dba/connectivity/source/drivers/sqlite3/ ==================================================== File [changed]: sqDatabaseMetaData.cxx Url: http://dba.openoffice.org/source/browse/dba/connectivity/source/drivers/sqlite3/sqDatabaseMetaData.cxx?r1=1.1.2.4&r2=1.1.2.5 Delta lines: +19 -19 --------------------- --- sqDatabaseMetaData.cxx 18 Aug 2006 22:48:26 -0000 1.1.2.4 +++ sqDatabaseMetaData.cxx 19 Aug 2006 01:42:45 -0000 1.1.2.5 @@ -4,9 +4,9 @@ * * $RCSfile: sqDatabaseMetaData.cxx,v $ * - * $Revision: 1.1.2.4 $ + * $Revision: 1.1.2.5 $ * - * last change: $Author: aklitzing $ $Date: 2006/08/18 22:48:26 $ + * last change: $Author: aklitzing $ $Date: 2006/08/19 01:42:45 $ * * Original contributor: André Klitzing * @@ -912,10 +912,10 @@ // But it isn't possible to use SQLite-Types at this point // because we don't have any data in this result. Only Table-Structur! // SQLite has types on CELLS - not on Columns! -long getColumns_ColType(const char* typeAsString) +long getColumns_ColType(const wchar_t* typeAsString) { using ::rtl::OUString; - OUString str = OUString::createFromAscii(typeAsString).toAsciiLowerCase(); + OUString str = OUString((const sal_Unicode*) typeAsString).toAsciiLowerCase(); if(str.indexOf(OUString::createFromAscii("int"), 0) != -1 || str.indexOf(OUString::createFromAscii("numeric"), 0) != -1) return com::sun::star::sdbc::DataType::INTEGER; @@ -956,12 +956,12 @@ */ sqQueryPrepared* query = db->getQuery("pragma table_info(%q)", mTableName); // TODO - attached databases (schema) needs "pragma schema.table_info(%q)" - will be added with sqlite3_BINDs - checkError(query, ::rtl::OUString::createFromAscii("unable to get column information")); + checkError(query, ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Unable to get column information"))); for(query->execute(); !query->isDone(); query->nextRow()) { - const char* tmp = query->getText(1); // to avoid stack-usage - if(!columnNamePattern.equalsAscii("%") && (tmp == 0 || !columnNamePattern.equalsAscii(tmp))) + const sal_Unicode* tmp = (const sal_Unicode*) query->getTextUTF16(1); // to avoid stack-usage + if(!columnNamePattern.equalsAscii("%") && (tmp == 0 || !columnNamePattern.equals(tmp))) continue; bool nullable = query->getInteger(3) != 99; // 99 means NOT NULL - see above @@ -977,20 +977,20 @@ aRow.push_back(new ORowSetValueDecorator(tableNamePattern)); // COLUMN_NAME - if (tmp == 0) // tmp = query->getText(1); --> see above + if (tmp == 0) // tmp = query->getTextUTF16(1); --> see above aRow.push_back(ODatabaseMetaDataResultSet::getEmptyValue()); else - aRow.push_back(new ORowSetValueDecorator(::rtl::OUString::createFromAscii(tmp))); + aRow.push_back(new ORowSetValueDecorator(::rtl::OUString(tmp))); // DATA_TYPE - aRow.push_back(new ORowSetValueDecorator(::rtl::OUString::valueOf( getColumns_ColType(query->getText(2) )))); + aRow.push_back(new ORowSetValueDecorator(::rtl::OUString::valueOf( getColumns_ColType(query->getTextUTF16(2)) ))); // TYPE_NAME - tmp = query->getText(2); + tmp = (const sal_Unicode*) query->getTextUTF16(2); if (tmp == 0) aRow.push_back(ODatabaseMetaDataResultSet::getEmptyValue()); else - aRow.push_back(new ORowSetValueDecorator(::rtl::OUString::createFromAscii(tmp))); + aRow.push_back(new ORowSetValueDecorator(::rtl::OUString(tmp))); // COLUMN_SIZE aRow.push_back(new ORowSetValueDecorator(::rtl::OUString::createFromAscii("65535"))); //!< \todo muss getestet werden @@ -1006,11 +1006,11 @@ aRow.push_back(new ORowSetValueDecorator()); // COLUMN_DEF - tmp = query->getText(4); + tmp = (const sal_Unicode*) query->getTextUTF16(4); if (query->isNull(4)) aRow.push_back(new ORowSetValueDecorator()); else - aRow.push_back(new ORowSetValueDecorator(::rtl::OUString::createFromAscii(tmp))); + aRow.push_back(new ORowSetValueDecorator(::rtl::OUString(tmp))); // SQL_DATA_TYPE aRow.push_back(new ORowSetValueDecorator(::rtl::OUString::createFromAscii("0"))); @@ -1065,11 +1065,11 @@ sqDB* db = m_pConnection->getDB(); ::rtl::OString stmt = ::rtl::OString("SELECT name FROM sqlite_master WHERE type = '%q'"); sqQueryPrepared* query = db->getQuery(stmt, tableType.toAsciiLowerCase().getStr()); // SQLite needs lowercase but OOo needs uppercase - checkError(query, ::rtl::OUString::createFromAscii("unable to get table/view information")); + checkError(query, ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Unable to get table/view information"))); for (query->execute(); !query->isDone(); query->nextRow()) { - ::rtl::OUString tableName = ::rtl::OUString::createFromAscii(query->getText(0)); + ::rtl::OUString tableName((const sal_Unicode*) query->getTextUTF16(0)); ODatabaseMetaDataResultSet::ORow aRow(3); aRow.push_back(new ORowSetValueDecorator(tableName)); @@ -1157,9 +1157,9 @@ // TABLE_NAME aRow.push_back(new ORowSetValueDecorator(table)); // COLUMN_NAME - aRow.push_back(new ORowSetValueDecorator(::rtl::OUString::createFromAscii(query->getText(1)))); + aRow.push_back(new ORowSetValueDecorator(::rtl::OUString((const sal_Unicode*) query->getTextUTF16(1)))); // KEY_SEQ - aRow.push_back(new ORowSetValueDecorator(::rtl::OUString::valueOf(key_seq++, 10))); + aRow.push_back(new ORowSetValueDecorator(::rtl::OUString::valueOf(key_seq++))); // PK_NAME aRow.push_back(new ORowSetValueDecorator()); @@ -1227,7 +1227,7 @@ if (query->getReturnNo() != SQLITE_OK) { sqDB* parent = query->getParentDB(); - ::rtl::OUString msg = ::rtl::OUString::createFromAscii(parent->getLastErrorMsg()); + ::rtl::OUString msg((const sal_Unicode*) parent->getLastErrorMsgUTF16()); parent->free(query); throw SQLException(error, *this, msg, parent->getLastErrorNo(), Any()); } File [changed]: sqDB.cpp Url: http://dba.openoffice.org/source/browse/dba/connectivity/source/drivers/sqlite3/sqDB.cpp?r1=1.1.2.2&r2=1.1.2.3 Delta lines: +7 -2 ------------------- --- sqDB.cpp 18 Aug 2006 18:53:05 -0000 1.1.2.2 +++ sqDB.cpp 19 Aug 2006 01:42:45 -0000 1.1.2.3 @@ -4,9 +4,9 @@ * * $RCSfile: sqDB.cpp,v $ * - * $Revision: 1.1.2.2 $ + * $Revision: 1.1.2.3 $ * - * last change: $Author: aklitzing $ $Date: 2006/08/18 18:53:05 $ + * last change: $Author: aklitzing $ $Date: 2006/08/19 01:42:45 $ * * Original contributor: André Klitzing * @@ -100,6 +100,11 @@ const char* sqDB::getLastErrorMsg() const { return sqlite3_errmsg(m_db); +} + +const wchar_t* sqDB::getLastErrorMsgUTF16() const +{ + return (const wchar_t*) sqlite3_errmsg16(m_db); // sqlite returns (const void*) } int sqDB::getLastErrorNo() const File [changed]: sqDB.h Url: http://dba.openoffice.org/source/browse/dba/connectivity/source/drivers/sqlite3/sqDB.h?r1=1.1.2.2&r2=1.1.2.3 Delta lines: +7 -2 ------------------- --- sqDB.h 18 Aug 2006 18:53:05 -0000 1.1.2.2 +++ sqDB.h 19 Aug 2006 01:42:45 -0000 1.1.2.3 @@ -4,9 +4,9 @@ * * $RCSfile: sqDB.h,v $ * - * $Revision: 1.1.2.2 $ + * $Revision: 1.1.2.3 $ * - * last change: $Author: aklitzing $ $Date: 2006/08/18 18:53:05 $ + * last change: $Author: aklitzing $ $Date: 2006/08/19 01:42:45 $ * * Original contributor: André Klitzing * @@ -159,6 +159,11 @@ //! \brief returns a human-readable message of the last error //! \return a read-only null-terminated char-array or "not an error" if the last API call was successful const char* getLastErrorMsg() const; + + //! \fn const wchar_t* getLastErrorMsgUTF16() const + //! \brief returns a human-readable message of the last error + //! \return a read-only null-terminated widechar-array or "not an error" if the last API call was successful + const wchar_t* getLastErrorMsgUTF16() const; //! \fn int getLastErrorNo() const //! \brief returns the error-number of the last error File [changed]: sqQueryPrepared.cpp Url: http://dba.openoffice.org/source/browse/dba/connectivity/source/drivers/sqlite3/sqQueryPrepared.cpp?r1=1.1.2.3&r2=1.1.2.4 Delta lines: +32 -2 -------------------- --- sqQueryPrepared.cpp 18 Aug 2006 22:45:02 -0000 1.1.2.3 +++ sqQueryPrepared.cpp 19 Aug 2006 01:42:45 -0000 1.1.2.4 @@ -4,9 +4,9 @@ * * $RCSfile: sqQueryPrepared.cpp,v $ * - * $Revision: 1.1.2.3 $ + * $Revision: 1.1.2.4 $ * - * last change: $Author: aklitzing $ $Date: 2006/08/18 22:45:02 $ + * last change: $Author: aklitzing $ $Date: 2006/08/19 01:42:45 $ * * Original contributor: André Klitzing * @@ -176,22 +176,42 @@ return sqlite3_column_name(m_stmt, column); } +const wchar_t* sqQueryPrepared::getNameUTF16(int column) const +{ + return (const wchar_t*) sqlite3_column_name16(m_stmt, column); // sqlite3 returns (const void*) +} + const char* sqQueryPrepared::getOriginName(int column) const { return sqlite3_column_origin_name(m_stmt, column); } +const wchar_t* sqQueryPrepared::getOriginNameUTF16(int column) const +{ + return (const wchar_t*) sqlite3_column_origin_name16(m_stmt, column); // sqlite3 returns (const void*) +} + // needs >= sqlite 3.3.0 const char* sqQueryPrepared::getTableName(int column) const { return sqlite3_column_table_name(m_stmt, column); } +const wchar_t* sqQueryPrepared::getTableNameUTF16(int column) const +{ + return (const wchar_t*) sqlite3_column_table_name16(m_stmt, column); // sqlite3 returns (const void*) +} + const char* sqQueryPrepared::getDatabaseName(int column) const { return sqlite3_column_database_name(m_stmt, column); } +const wchar_t* sqQueryPrepared::getDatabaseNameUTF16(int column) const +{ + return (const wchar_t*) sqlite3_column_database_name16(m_stmt, column); // sqlite3 returns (const void*) +} + int sqQueryPrepared::getType(int column) const { return sqlite3_column_type(m_stmt, column); @@ -202,6 +222,11 @@ return sqlite3_column_decltype(m_stmt, column); } +const wchar_t* sqQueryPrepared::getTypeTextUTF16(int column) const +{ + return (const wchar_t*) sqlite3_column_decltype16(m_stmt, column); // sqlite3 returns (const void*) +} + int sqQueryPrepared::getColumnMetadata(int column, char const** out_DataType, char const** out_CollSeq, int* out_isNotNull, int* out_isPK, int* out_isAutoInc) const { @@ -215,6 +240,11 @@ const char* sqQueryPrepared::getText(int column) const { return (const char*) sqlite3_column_text(m_stmt, column); // sqlite3 returns (const unsigned char*) +} + +const wchar_t* sqQueryPrepared::getTextUTF16(int column) const +{ + return (const wchar_t*) sqlite3_column_text16(m_stmt, column); // sqlite3 returns (const void*) } int sqQueryPrepared::getInteger(int column) const File [changed]: sqQueryPrepared.h Url: http://dba.openoffice.org/source/browse/dba/connectivity/source/drivers/sqlite3/sqQueryPrepared.h?r1=1.1.2.2&r2=1.1.2.3 Delta lines: +41 -5 -------------------- --- sqQueryPrepared.h 18 Aug 2006 18:54:24 -0000 1.1.2.2 +++ sqQueryPrepared.h 19 Aug 2006 01:42:46 -0000 1.1.2.3 @@ -4,9 +4,9 @@ * * $RCSfile: sqQueryPrepared.h,v $ * - * $Revision: 1.1.2.2 $ + * $Revision: 1.1.2.3 $ * - * last change: $Author: aklitzing $ $Date: 2006/08/18 18:54:24 $ + * last change: $Author: aklitzing $ $Date: 2006/08/19 01:42:46 $ * * Original contributor: André Klitzing * @@ -125,7 +125,7 @@ SQLITE_ROW there is a new row available (your cursor is on the new row now) SQLITE_DONE there is NO new row available - (your cursor ist after the last - don't retry nextRow() again) SQLITE_BUSY you wanted to open a locked database-file - try it again or install a busy-handler - SQLITE_ERROR a runtime-error occured, use sqDB->getLastErrorLog() for more information + SQLITE_ERROR a runtime-error occured, use sqDB->getLastErrorMsg() for more information SQLITE_MISUSE if you called nextRow() after SQLITE_DONE/SQLITE_ERROR or you did something other wrong... */ //! \return result-code of sqlite3 for sqlite3_step() or SQLITE_DONE if there is no next row @@ -171,23 +171,47 @@ //! \param column index of the column; first is 0 and second is 1... const char* getName(int column) const; + //! \fn const char* getNameUTF16(int column) const + //! \brief returns the name of given column (the name from AS in SELECT-statement) + //! \return a read-only null-terminated widechar-array, or NULL if there is no column with given index + //! \param column index of the column; first is 0 and second is 1... + const wchar_t* getNameUTF16(int column) const; + //! \fn const char* getOriginName(int column) const //! \brief returns the original name of given column (not the AS-name from SELECT-statement) //! \return a read-only null-terminated char-array, or NULL if there is no column with given index //! \param column index of the column; first is 0 and second is 1... const char* getOriginName(int column) const; + //! \fn const wchar_t* getOriginNameUTF16(int column) const + //! \brief returns the original name of given column (not the AS-name from SELECT-statement) + //! \return a read-only null-terminated widechar-array, or NULL if there is no column with given index + //! \param column index of the column; first is 0 and second is 1... + const wchar_t* getOriginNameUTF16(int column) const; + //! \fn const char* getTableName(int column) const //! \brief returns the name of the table of given column (more useful with JOINs) //! \return a read-only null-terminated char-array, or NULL if there is no column with given index //! \param column index of the column; first is 0 and second is 1... const char* getTableName(int column) const; - //! \fn const char* sqQueryPrepared::getDatabaseName(int column) const + //! \fn const wchar_t* getTableNameUTF16(int column) const + //! \brief returns the name of the table of given column (more useful with JOINs) + //! \return a read-only null-terminated widechar-array, or NULL if there is no column with given index + //! \param column index of the column; first is 0 and second is 1... + const wchar_t* getTableNameUTF16(int column) const; + + //! \fn const char* getDatabaseName(int column) const //! \brief returns the database-name of given column (more useful with JOINs and attached database-files; default: 'main') //! \return a read-only null-terminated char-array, or NULL if there is no column with given index //! \param column index of the column; first is 0 and second is 1... - const char* sqQueryPrepared::getDatabaseName(int column) const; + const char* getDatabaseName(int column) const; + + //! \fn const wchar_t* getDatabaseNameUTF16(int column) const + //! \brief returns the database-name of given column (more useful with JOINs and attached database-files; default: 'main') + //! \return a read-only null-terminated widechar-array, or NULL if there is no column with given index + //! \param column index of the column; first is 0 and second is 1... + const wchar_t* getDatabaseNameUTF16(int column) const; //! \fn int getType(int column) const //! \brief returns the type of the given column @@ -209,6 +233,12 @@ //! \return a read-only null-terminated char-array, or NULL if there is no column with given index const char* getTypeText(int column) const; + //! \fn const wchar_t* getTypeTextUTF16(int column) const + //! \brief returns the type as a text. It will be taken CREATE TABLE statement. (e.g. varchar(255)) + //! \param column index of the column; first is 0 and second is 1... + //! \return a read-only null-terminated widechar-array, or NULL if there is no column with given index + const wchar_t* getTypeTextUTF16(int column) const; + //! \fn int getColumnMetadata(int column, char const** out_DataType, char const** out_CollSeq, int* out_isNotNull, int* out_isPK, int* out_isAutoInc) const //! \brief this is just a wrapper to sqDB::getColumnMetadata() /*! @@ -235,6 +265,12 @@ //! \param column index of the column; first is 0 and second is 1... //! \return a read-only null-terminated char-array, or NULL if there is no column with given index const char* getText(int column) const; + + //! \fn const wchar_t* getTextUTF16(int column) const + //! \brief returns the content of that cell as text (encoding UTF16) + //! \param column index of the column; first is 0 and second is 1... + //! \return a read-only null-terminated widechar-array, or NULL if there is no column with given index + const wchar_t* getTextUTF16(int column) const; //! \fn int getInteger(int column) const //! \brief returns the content of that cell as integer - maybe 0 if sqlite can't cast it. Double values will be truncated File [changed]: sqResultSet.cxx Url: http://dba.openoffice.org/source/browse/dba/connectivity/source/drivers/sqlite3/sqResultSet.cxx?r1=1.1.2.3&r2=1.1.2.4 Delta lines: +5 -5 ------------------- --- sqResultSet.cxx 18 Aug 2006 20:08:36 -0000 1.1.2.3 +++ sqResultSet.cxx 19 Aug 2006 01:42:46 -0000 1.1.2.4 @@ -4,9 +4,9 @@ * * $RCSfile: sqResultSet.cxx,v $ * - * $Revision: 1.1.2.3 $ + * $Revision: 1.1.2.4 $ * - * last change: $Author: aklitzing $ $Date: 2006/08/18 20:08:36 $ + * last change: $Author: aklitzing $ $Date: 2006/08/19 01:42:46 $ * * Original contributor: André Klitzing * @@ -346,7 +346,7 @@ checkDisposed(OResultSet_BASE::rBHelper.bDisposed); setWasNull(columnIndex); - return ::rtl::OUString::createFromAscii(m_pQuery->getText(columnIndex-1)); + return ::rtl::OUString((const sal_Unicode*) m_pQuery->getTextUTF16(columnIndex-1)); } // ------------------------------------------------------------------------- @@ -526,8 +526,8 @@ else { sqDB* parent = m_pQuery->getParentDB(); - ::rtl::OUString msg = ::rtl::OUString::createFromAscii(parent->getLastErrorMsg()); - throw SQLException(::rtl::OUString::createFromAscii("An unkown error occured"), *this, msg, parent->getLastErrorNo(), Any()); + ::rtl::OUString msg((const sal_Unicode*) parent->getLastErrorMsgUTF16()); + throw SQLException(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("An unkown error occured")), *this, msg, parent->getLastErrorNo(), Any()); } } // ------------------------------------------------------------------------- File [changed]: sqResultSetMetaData.cxx Url: http://dba.openoffice.org/source/browse/dba/connectivity/source/drivers/sqlite3/sqResultSetMetaData.cxx?r1=1.1.2.2&r2=1.1.2.3 Delta lines: +9 -9 ------------------- --- sqResultSetMetaData.cxx 18 Aug 2006 19:02:45 -0000 1.1.2.2 +++ sqResultSetMetaData.cxx 19 Aug 2006 01:42:46 -0000 1.1.2.3 @@ -4,9 +4,9 @@ * * $RCSfile: sqResultSetMetaData.cxx,v $ * - * $Revision: 1.1.2.2 $ + * $Revision: 1.1.2.3 $ * - * last change: $Author: aklitzing $ $Date: 2006/08/18 19:02:45 $ + * last change: $Author: aklitzing $ $Date: 2006/08/19 01:42:46 $ * * Original contributor: André Klitzing * @@ -67,8 +67,8 @@ else if(sqType == SQLITE_NULL) return com::sun::star::sdbc::DataType::SQLNULL; else - throw SQLException(::rtl::OUString::createFromAscii("An unkown error occured"), - *this, ::rtl::OUString::createFromAscii("Unknown ColumnType"), -1, Any()); + throw SQLException(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("An unkown error occured")), + *this, ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Unknown ColumnType")), -1, Any()); } // ------------------------------------------------------------------------- @@ -86,18 +86,18 @@ ::rtl::OUString SAL_CALL OResultSetMetaData::getSchemaName( sal_Int32 column ) throw(SQLException, RuntimeException) { - return ::rtl::OUString::createFromAscii(m_pQuery->getDatabaseName(column-1)); + return ::rtl::OUString((const sal_Unicode*) m_pQuery->getDatabaseNameUTF16(column-1)); } // ------------------------------------------------------------------------- ::rtl::OUString SAL_CALL OResultSetMetaData::getColumnName( sal_Int32 column ) throw(SQLException, RuntimeException) { - return ::rtl::OUString::createFromAscii(m_pQuery->getOriginName(column-1)); + return ::rtl::OUString((const sal_Unicode*) m_pQuery->getOriginNameUTF16(column-1)); } // ------------------------------------------------------------------------- ::rtl::OUString SAL_CALL OResultSetMetaData::getTableName( sal_Int32 column ) throw(SQLException, RuntimeException) { - return ::rtl::OUString::createFromAscii(m_pQuery->getTableName(column-1)); + return ::rtl::OUString((const sal_Unicode*) m_pQuery->getTableNameUTF16(column-1)); } // ------------------------------------------------------------------------- ::rtl::OUString SAL_CALL OResultSetMetaData::getCatalogName( sal_Int32 column ) throw(SQLException, RuntimeException) @@ -107,12 +107,12 @@ // ------------------------------------------------------------------------- ::rtl::OUString SAL_CALL OResultSetMetaData::getColumnTypeName( sal_Int32 column ) throw(SQLException, RuntimeException) { - return ::rtl::OUString::createFromAscii(m_pQuery->getTypeText(column-1)); + return ::rtl::OUString((const sal_Unicode*) m_pQuery->getTypeTextUTF16(column-1)); } // ------------------------------------------------------------------------- ::rtl::OUString SAL_CALL OResultSetMetaData::getColumnLabel( sal_Int32 column ) throw(SQLException, RuntimeException) { - return ::rtl::OUString::createFromAscii(m_pQuery->getName(column-1)); + return ::rtl::OUString((const sal_Unicode*) m_pQuery->getNameUTF16(column-1)); } // ------------------------------------------------------------------------- ::rtl::OUString SAL_CALL OResultSetMetaData::getColumnServiceName( sal_Int32 column ) throw(SQLException, RuntimeException) File [changed]: sqStatement.cxx Url: http://dba.openoffice.org/source/browse/dba/connectivity/source/drivers/sqlite3/sqStatement.cxx?r1=1.1.2.2&r2=1.1.2.3 Delta lines: +3 -3 ------------------- --- sqStatement.cxx 18 Aug 2006 18:59:01 -0000 1.1.2.2 +++ sqStatement.cxx 19 Aug 2006 01:42:46 -0000 1.1.2.3 @@ -4,9 +4,9 @@ * * $RCSfile: sqStatement.cxx,v $ * - * $Revision: 1.1.2.2 $ + * $Revision: 1.1.2.3 $ * - * last change: $Author: aklitzing $ $Date: 2006/08/18 18:59:01 $ + * last change: $Author: aklitzing $ $Date: 2006/08/19 01:42:46 $ * * Original contributor: André Klitzing * @@ -405,7 +405,7 @@ if (query->getReturnNo() != SQLITE_OK) { sqDB* parent = query->getParentDB(); - ::rtl::OUString msg = ::rtl::OUString::createFromAscii(parent->getLastErrorMsg()); + ::rtl::OUString msg((const sal_Unicode*) parent->getLastErrorMsgUTF16()); parent->free(query); throw SQLException(error, *this, msg, parent->getLastErrorNo(), Any()); } --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
