필터 지우기
필터 지우기

Database data truncated before second string

조회 수: 1 (최근 30일)
Rene
Rene 2011년 8월 10일
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