Filter löschen
Filter löschen

Database data truncated before second string

1 Ansicht (letzte 30 Tage)
Rene
Rene am 10 Aug. 2011
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 Kommentar
Oleg Komarov
Oleg Komarov am 10 Aug. 2011
Usually you cannot connect 64bit MATLAB to 32bit SQL but I guess you managed and this is the result.

Melden Sie sich an, um zu kommentieren.

Akzeptierte Antwort

Rene
Rene am 10 Aug. 2011
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...

Weitere Antworten (0)

Produkte

Community Treasure Hunt

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

Start Hunting!

Translated by