Database data truncated before second string

1 次查看(过去 30 天)
I have a weird problem reading database information. My database contains two columns, a and b. Column a is contains numbers and b contains text. When I use the query
SELECT ALL a FROM etc...
I get all the numbers a intended in a 112x1 cell. The same thing happens when I call only for b, a nice 112x1 cell results.
However using this query
SELECT ALL a,b FROM etc..
the resulting cell look like '1123' 'my text' '423'
stopping before the 2nd text.
Using a query asking for 5 columns containing numbers result in an intended 112x5 cell, including text it puts all the data in a row stopping just before the second text field.
I use matlab 2010a x64. The query work fine on a different computer running 2010b x86.
Thanks for the help!
  1 个评论
Oleg Komarov
Oleg Komarov 2011-8-10
Usually you cannot connect 64bit MATLAB to 32bit SQL but I guess you managed and this is the result.

请先登录,再进行评论。

采纳的回答

Rene
Rene 2011-8-10
Turns out Oleg was partially right.
First I only added my database connection in the ODBC-user tab.
Now I added it to the ODBC-System DSN tab and it works fine!
(all of this in the 64-bit ODBC, in the 32-bit ODBC it is not listed at all)
I still do not understand why it led to this weird truncation...

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Database Toolbox 的更多信息

产品

Community Treasure Hunt

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

Start Hunting!

Translated by