[dba-issues] [Issue 102791] ODBC binds NUMERIC and DE CIMAL statement parameters as CHAR
To comment on the following update, log in, then open the issue: http://www.openoffice.org/issues/show_bug.cgi?id=102791 User msc changed the following: What|Old value |New value Status|RESOLVED |VERIFIED --- Additional comments from m...@openoffice.org Fri Jan 8 10:27:54 + 2010 --- verified in CWS dba33b by user ludob. find more information about this CWS, like when it is available in the master builds, in EIS, the Environment Information System: http://eis.services.openoffice.org/EIS2/cws.ShowCWS?Path=DEV300%2Fdba33b - Please do not reply to this automatically generated notification from Issue Tracker. Please log onto the website and enter your comments. http://qa.openoffice.org/issue_handling/project_issues.html#notification - To unsubscribe, e-mail: issues-unsubscr...@dba.openoffice.org For additional commands, e-mail: issues-h...@dba.openoffice.org - To unsubscribe, e-mail: allbugs-unsubscr...@openoffice.org For additional commands, e-mail: allbugs-h...@openoffice.org
[dba-issues] [Issue 102791] ODBC binds NUMERIC and DE CIMAL statement parameters as CHAR
To comment on the following update, log in, then open the issue: http://www.openoffice.org/issues/show_bug.cgi?id=102791 --- Additional comments from lu...@openoffice.org Wed Dec 16 08:59:03 + 2009 --- OK - Please do not reply to this automatically generated notification from Issue Tracker. Please log onto the website and enter your comments. http://qa.openoffice.org/issue_handling/project_issues.html#notification - To unsubscribe, e-mail: issues-unsubscr...@dba.openoffice.org For additional commands, e-mail: issues-h...@dba.openoffice.org - To unsubscribe, e-mail: allbugs-unsubscr...@openoffice.org For additional commands, e-mail: allbugs-h...@openoffice.org
[dba-issues] [Issue 102791] ODBC binds NUMERIC and DE CIMAL statement parameters as CHAR
To comment on the following update, log in, then open the issue: http://www.openoffice.org/issues/show_bug.cgi?id=102791 User oj changed the following: What|Old value |New value Assigned to|oj|fs --- Additional comments from o...@openoffice.org Mon Dec 14 12:31:21 + 2009 --- Please review connectivity/source/odbcbase/OTools.cxx OPreparedStatement.(c|h)xx Thanks. - Please do not reply to this automatically generated notification from Issue Tracker. Please log onto the website and enter your comments. http://qa.openoffice.org/issue_handling/project_issues.html#notification - To unsubscribe, e-mail: issues-unsubscr...@dba.openoffice.org For additional commands, e-mail: issues-h...@dba.openoffice.org - To unsubscribe, e-mail: allbugs-unsubscr...@openoffice.org For additional commands, e-mail: allbugs-h...@openoffice.org
[dba-issues] [Issue 102791] ODBC binds NUMERIC and DE CIMAL statement parameters as CHAR
To comment on the following update, log in, then open the issue: http://www.openoffice.org/issues/show_bug.cgi?id=102791 User oj changed the following: What|Old value |New value Status|NEW |RESOLVED Resolution| |FIXED Target milestone|OOo Later |OOo 3.3 --- Additional comments from o...@openoffice.org Wed Nov 11 11:34:13 + 2009 --- Fixed in cws dba33b Thanks for the help. - Please do not reply to this automatically generated notification from Issue Tracker. Please log onto the website and enter your comments. http://qa.openoffice.org/issue_handling/project_issues.html#notification - To unsubscribe, e-mail: issues-unsubscr...@dba.openoffice.org For additional commands, e-mail: issues-h...@dba.openoffice.org - To unsubscribe, e-mail: allbugs-unsubscr...@openoffice.org For additional commands, e-mail: allbugs-h...@openoffice.org
[dba-issues] [Issue 102791] ODBC binds NUMERIC and DE CIMAL statement parameters as CHAR
To comment on the following update, log in, then open the issue: http://www.openoffice.org/issues/show_bug.cgi?id=102791 --- Additional comments from lu...@openoffice.org Thu Oct 29 14:58:17 + 2009 --- OK. Here it goes (not a real diff): connectivity/source/drivers/odbcbase/OTools.cxx @ 134 case SQL_CHAR: case SQL_VARCHAR: + case SQL_DECIMAL: if(_bUseWChar) { *pLen = SQL_NTS; connectivity/source/drivers/odbcbase/OTools.cxx @ 160 break; case SQL_NUMERIC: - case SQL_DECIMAL: if(_bUseWChar) { ::rtl::OUString aString = rtl::OUString::valueOf(*(double*)_pValue); connectivity/source/drivers/odbcbase/OPreparedStatement.cxx @ 276 setParameter(parameterIndex,DataType::CHAR,aString.getLength(),(void*)x); } +// - + +void SAL_CALL OPreparedStatement::setDecimal( sal_Int32 parameterIndex, const ::rtl::OUString x ) throw(SQLException, RuntimeException) +{ + ::rtl::OString aString(::rtl::OUStringToOString(x,getOwnConnection()-getTextEncoding())); + setParameter(parameterIndex,DataType::DECIMAL,aString.getLength(),(void*)x); +} // - Reference XConnection SAL_CALL OPreparedStatement::getConnection( ) throw(SQLException, RuntimeException) { connectivity/source/drivers/odbcbase/OPreparedStatement.cxx @ 530 setNull(parameterIndex,sqlType); break; case DataType::DECIMAL: +{ +ORowSetValue aValue; +aValue.fill(x); +setDecimal(parameterIndex,aValue); +} +break; case DataType::NUMERIC: { ORowSetValue aValue; connectivity/source/inc/odbc/OPreparedStatement.hxx @ 146 virtual void SAL_CALL setString( sal_Int32 parameterIndex, const ::rtl::OUString x ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL setDecimal( sal_Int32 parameterIndex, const ::rtl::OUString x ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException); virtual void SAL_CALL setBytes( sal_Int32 parameterIndex, const ::com::sun::star::uno::Sequence sal_Int8 x ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException); These changes only affect DECIMAL and solves my issue with DB2. The binding of DECIMAL is now identical to MSAccess. Therefor I would suspect MySQL ODBC to be compatible with this change. Regarding NUMERIC and DB2, although SQLGetTypeInfo reports NUMERIC as a supported type for the IBM DB2 ODBC driver, I have never seen a NUMERIC type in a reply to SQLColumns. All SQL NUMBER/DECIMAL fields are reported as DECIMAL. The driver we have developped doesn't use NUMERIC at all for DB2. If this patch works also with the other databases then NUMERIC can stay as it is. - Please do not reply to this automatically generated notification from Issue Tracker. Please log onto the website and enter your comments. http://qa.openoffice.org/issue_handling/project_issues.html#notification - To unsubscribe, e-mail: issues-unsubscr...@dba.openoffice.org For additional commands, e-mail: issues-h...@dba.openoffice.org - To unsubscribe, e-mail: allbugs-unsubscr...@openoffice.org For additional commands, e-mail: allbugs-h...@openoffice.org
[dba-issues] [Issue 102791] ODBC binds NUMERIC and DE CIMAL statement parameters as CHAR
To comment on the following update, log in, then open the issue: http://www.openoffice.org/issues/show_bug.cgi?id=102791 --- Additional comments from lu...@openoffice.org Thu Oct 29 15:05:03 + 2009 --- In the new function OPreparedStatement::setDecimal I left ::rtl::OString aString(::rtl::OUStringToOString(x,getOwnConnection()-getTextEncoding())); Text encoding shouldn't affect numbers. Not knowing if there are side effects I left it in there (copied OPreparedStatement::setString to create OPreparedStatement::setDecimal). If there are no side effects, please do leave it out. - Please do not reply to this automatically generated notification from Issue Tracker. Please log onto the website and enter your comments. http://qa.openoffice.org/issue_handling/project_issues.html#notification - To unsubscribe, e-mail: issues-unsubscr...@dba.openoffice.org For additional commands, e-mail: issues-h...@dba.openoffice.org - To unsubscribe, e-mail: allbugs-unsubscr...@openoffice.org For additional commands, e-mail: allbugs-h...@openoffice.org
[dba-issues] [Issue 102791] ODBC binds NUMERIC and DE CIMAL statement parameters as CHAR
To comment on the following update, log in, then open the issue: http://www.openoffice.org/issues/show_bug.cgi?id=102791 --- Additional comments from f...@openoffice.org Thu Oct 8 12:20:23 + 2009 --- since you're somewhat code-affine, obviously - can you come up with a patch which solves the problem for you? We could then test it against other databases, in particular the one mentioned in issue 85639. - Please do not reply to this automatically generated notification from Issue Tracker. Please log onto the website and enter your comments. http://qa.openoffice.org/issue_handling/project_issues.html#notification - To unsubscribe, e-mail: issues-unsubscr...@dba.openoffice.org For additional commands, e-mail: issues-h...@dba.openoffice.org - To unsubscribe, e-mail: allbugs-unsubscr...@openoffice.org For additional commands, e-mail: allbugs-h...@openoffice.org
[dba-issues] [Issue 102791] ODBC binds NUMERIC and DE CIMAL statement parameters as CHAR
To comment on the following update, log in, then open the issue: http://www.openoffice.org/issues/show_bug.cgi?id=102791 --- Additional comments from lu...@openoffice.org Wed Jun 24 09:05:01 + 2009 --- Numeric is a little more complex but for Decimal I agree that data should be transferred as a string, but, for the driver to know what to do with it, the ParameterType value in SQLBindParameter should be set to SQL_DECIMAL, the ValueType being set to SQL_C_CHAR or SQL_C_WCHAR. This is also how MsAccess binds Decimal parameters. At least for Decimal, this solution should solve the problem for all DB's. For Numeric, I haven't tested yet. - Please do not reply to this automatically generated notification from Issue Tracker. Please log onto the website and enter your comments. http://qa.openoffice.org/issue_handling/project_issues.html#notification - To unsubscribe, e-mail: issues-unsubscr...@dba.openoffice.org For additional commands, e-mail: issues-h...@dba.openoffice.org - To unsubscribe, e-mail: allbugs-unsubscr...@openoffice.org For additional commands, e-mail: allbugs-h...@openoffice.org
[dba-issues] [Issue 102791] ODBC binds NUMERIC and DE CIMAL statement parameters as CHAR
To comment on the following update, log in, then open the issue: http://www.openoffice.org/issues/show_bug.cgi?id=102791 --- Additional comments from f...@openoffice.org Mon Jun 22 12:15:37 + 2009 --- Looking into the history of the OPreparedStatement implementation shows that we once transferred numeric values as, well, numeric values. Which lead to issue 85639 ... (for completeness, we already did that before, but it broke, which is issue 85639. Transfering them as string was not invented by fixing the issue.) Which means: some database require the values being transferred as string, some require them being transferred as numerics. Sigh. Sounds like yet another per-database option :-\ - Please do not reply to this automatically generated notification from Issue Tracker. Please log onto the website and enter your comments. http://qa.openoffice.org/issue_handling/project_issues.html#notification - To unsubscribe, e-mail: issues-unsubscr...@dba.openoffice.org For additional commands, e-mail: issues-h...@dba.openoffice.org - To unsubscribe, e-mail: allbugs-unsubscr...@openoffice.org For additional commands, e-mail: allbugs-h...@openoffice.org
[dba-issues] [Issue 102791] ODBC binds NUMERIC and DE CIMAL statement parameters as CHAR
To comment on the following update, log in, then open the issue: http://www.openoffice.org/issues/show_bug.cgi?id=102791 User fs changed the following: What|Old value |New value Assigned to|dbaneedsconfirm |oj Ever confirmed| |1 Status|UNCONFIRMED |NEW --- Additional comments from f...@openoffice.org Mon Jun 22 12:19:10 + 2009 --- fs-oj: What do you think? Yet Another Option? - Please do not reply to this automatically generated notification from Issue Tracker. Please log onto the website and enter your comments. http://qa.openoffice.org/issue_handling/project_issues.html#notification - To unsubscribe, e-mail: issues-unsubscr...@dba.openoffice.org For additional commands, e-mail: issues-h...@dba.openoffice.org - To unsubscribe, e-mail: allbugs-unsubscr...@openoffice.org For additional commands, e-mail: allbugs-h...@openoffice.org
[dba-issues] [Issue 102791] ODBC binds NUMERIC and DE CIMAL statement parameters as CHAR
To comment on the following update, log in, then open the issue: http://www.openoffice.org/issues/show_bug.cgi?id=102791 User fs changed the following: What|Old value |New value Target milestone|--- |OOo Later - Please do not reply to this automatically generated notification from Issue Tracker. Please log onto the website and enter your comments. http://qa.openoffice.org/issue_handling/project_issues.html#notification - To unsubscribe, e-mail: issues-unsubscr...@dba.openoffice.org For additional commands, e-mail: issues-h...@dba.openoffice.org - To unsubscribe, e-mail: allbugs-unsubscr...@openoffice.org For additional commands, e-mail: allbugs-h...@openoffice.org
[dba-issues] [Issue 102791] ODBC binds NUMERIC and DE CIMAL statement parameters as CHAR
To comment on the following update, log in, then open the issue: http://www.openoffice.org/issues/show_bug.cgi?id=102791 Issue #|102791 Summary|ODBC binds NUMERIC and DECIMAL statement parameters as | CHAR Component|Database access Version|OOO310m11 Platform|PC URL| OS/Version|Windows XP Status|UNCONFIRMED Status whiteboard| Keywords| Resolution| Issue type|DEFECT Priority|P3 Subcomponent|none Assigned to|dbaneedsconfirm Reported by|ludob --- Additional comments from lu...@openoffice.org Mon Jun 15 12:16:58 + 2009 --- ODBC binds NUMERIC and DECIMAL statement parameters as CHAR. As a result the values are quoted as any other string. This is fine for databases such as Oracle and MySQL that cast automatically a string to numeric or decimal. DB2 however does not allow a string to decimal assignment. Updating or inserting decimal values is not working and throws the database error SQLSTATE=42821 SQLCODE=-408. OPreparedStatement::setObjectWithInfo() forces DataType::DECIMAL and DataType::NUMERIC to bind as a string (setString(parameterIndex,aValue);). I suppose this was not done by accident. What is the reason for this? OTools::getBindTypes does generate the correct bindtypes for DataType::DECIMAL and DataType::NUMERIC but they are not used. - Please do not reply to this automatically generated notification from Issue Tracker. Please log onto the website and enter your comments. http://qa.openoffice.org/issue_handling/project_issues.html#notification - To unsubscribe, e-mail: issues-unsubscr...@dba.openoffice.org For additional commands, e-mail: issues-h...@dba.openoffice.org - To unsubscribe, e-mail: allbugs-unsubscr...@openoffice.org For additional commands, e-mail: allbugs-h...@openoffice.org