fastinsert returns "Numeric value out of range" error, but insert works

2 次查看(过去 30 天)
Hi! I have a situation where, on precisely the same data set, fastinsert is returning
"Java exception occurred: sun.jdbc.odbc.JdbcOdbcBatchUpdateException: [Microsoft][ODBC SQL Server Driver]Numeric value out of range"
but insert works. Looking at the help for fastinsert I see:
"...fastinsert ... supports more (emphasis added) object types than insert"
and the only exception to that I see documented is
"The fastinsert function only supports dates in U.S. format; that is, dates in mm/dd/yyyy format."
I did have this problem, but I corrected it (at least, the error I was getting before is different than the one cited above).
Is anyone aware of any other (undocumented) fastinsert limitations? Any other ideas?
Thanks!
  2 个评论
David Goldsmith
David Goldsmith 2012-3-7
P.S.: I completely removed the datetime strings from the data set and am still getting the same error, so it's definitely something else.
David Goldsmith
David Goldsmith 2012-3-7
OK, I've narrowed the problem down to three fields that are type TINYINT in "my" DB ("my" is in quotes 'cause it's not really mine to do with as I please, or I'd just change these all to SMALLINT). I found the following in the Database Toolbox User's Guide, section "Before You Begin," sub-section "Supported Data Types":
TINYINT
Note The Database Toolbox software interprets this data type as BOOLEAN and imports it into the MATLAB workspace as logical true (1) or false (0).
As I had been trying to insert the maximum SQL Server documented value for this type, 255, that must've been the problem, right? Wrong: I changed it to zero and still got the same "Numeric value of range" error! But, again, insert has no problem with these, only fastinsert is balking--is this a known, undocumented "feature" of fastinsert? Or have I stumbled across a bug?

请先登录,再进行评论。

回答(0 个)

类别

Help CenterFile Exchange 中查找有关 App Building 的更多信息

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by