Created attachment 53234 [details] picture of odbc connection error From SQL Server ODBC can't import the date format. It said that the datetime field overflow. The format of the source date : "11/5/2011 12:00:49 AM". Already try to make the same date format but still no chance.
Hi, Could be linked to failed assertions that have been noticed in other ODBC connections, and/or datetime string management in LO. Alex
The value you cite looks like a datetime, not a date. Where does "11/5/2011 12:00:49 AM" come from?
it's come from the logger machine which use sql server. If I use the office, it can imported sucessfully
What is the datatype of the field in question? (Yes, I am entertaining the possibility that the message in not strictly accurate.) What operation are you performing? Can you show us the SQL statement which provoked the message? What is your DATEFORMAT setting? Can you demonstrate the error on a publicly available instance of SQL Server?
Created attachment 53927 [details] the complete picture of libre error the complete picture of libre error
The data source type is timestamp. The problem is when I try to connect to one of it's database, it shown the problem that the "datetime field overflow". Here is the step : 1. I define the new database by connecting to the existing odbc and save the connection. Until this step still have no problem. 2. Open the libre office calc and view the data source, and click the database connection that already defined. Until this step still shown no problem. 3. When I click in one of the table inside, the error shown as attached before. I still don't have any activities for those table, just click on it and the error is appear. For the picture you can see at attached file.
Could you check with a daily build of 3.5 (master)? I have the impression this is maybe bug 34309 and I'm not sure we backported that fix to 3.4.x. Daily builds are at http://dev-builds.libreoffice.org/daily/
mandra, Thank you for the additional information. It helps me understand what you are seeing. What happens, I wonder, if you query the ODBC datasource from an SQL command-line front end? MS Office--I remember you wrote that it retrieves data successfully--does not have to go through ODBC, and thus its success does not tell us that the ODBC driver can handle the data. The SQL Server client tools include a command-line front end, but I do not know how to make it connect to the ODBC datasource. In its simplest invocation, it too would retrieve data more directly than through ODBC. Do your ODBC facilities offer the option of collecting a log of the session? It may be an option in the driver manager. (Of course, the log should not show your password, but check anyway before you publish it, eh?) Lionel, The text of the message looks like it comes from the ODBC driver. So, I think that the data cannot have reached the code fixed for bug 34309. (The message says "overflow", and arithmetic overflow was the cause of the apparent randomness of the errors reported in that bug, but still ...) Terry.
(In reply to comment #8) > The text of the message looks like it comes from the ODBC driver. So, I think > that the data cannot have reached the code fixed for bug 34309. Ah yes, good point.
(In reply to comment #6) > The data source type is timestamp. You *sure*? I notice on http://msdn.microsoft.com/en-us/library/ms182776.aspx: The rowversion data type is just an incrementing number and does not preserve a date or a time. To record a date or time, use a datetime2 data type. timestamp is the synonym for the rowversion data type (...). The Transact-SQL timestamp data type is different from the timestamp data type defined in the ISO standard. A nonnullable rowversion column is semantically equivalent to a binary(8) column. A nullable rowversion column is semantically equivalent to a varbinary(8) column. So this datatype does *not* contain a date&time... In my testing (with LibO 3.4.4 and SQL Server ODBC driver 6.01.7601.17514), a column with timestamp type is not shown, but still imports into Calc with value "#N/A" everywhere. Please show us the output of SQL command: SELECT * FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_CATALOG='master' AND TABLE_SCHEMA='dbo' AND TABLE_NAME='DATA_H1_ASB';
Hi Lionel, The data type of timestamp field is datetime, I already download for the daily update of libreoffice 3.5. For the first problem is already solved. But when I try to coneect it with calc application, it crashed when I drag the data from data source to spreadsheet cell. When I drag it, always says that the soffice.bin error and show some don't send confirmation report. Thanks for concern about my problem.
This could be a truncation issue; see http://social.msdn.microsoft.com/Forums/en-US/sqldataaccess/thread/ac1b5a6d-5e64-4603-9c92-b75ba4e51bf2/ mandra, could you please give us the *exact* details, because I can't reproduce your problem. For me, access to datetime columns works. * the type of the column is datetime and not datetime2? * what is the scale of the column * please show us the output of query: SELECT * FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_CATALOG='master' AND TABLE_SCHEMA='dbo' AND TABLE_NAME='DATA_H1_ASB'; * could you attach a database dump of a small, minimal, database that has the problem? * What version of SQL Server? What version of the ODBC driver?
No news from reporter for several months -> closing. Works for me, but possibly with different versions of SQL Server, ODBC driver, different column type (or scale), ... Anyone reproducing this bug, feel free to reopen *and* provide the needed details, that is: * the type of the column: timestamp, datetime, datetime2? * what is the scale of the column * output of query: SELECT * FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_CATALOG='master' AND TABLE_SCHEMA='dbo' AND TABLE_NAME='DATA_H1_ASB'; (replacing 'master', 'dbo', 'DATA_H1_ASB' by the values for the table where you encounter the problem) * attach a database dump of a small, minimal, database that has the problem? * What version of SQL Server? What version of the ODBC driver?