Borrar filtros
Borrar filtros

Database data truncated before second string

1 visualización (últimos 30 días)
Rene
Rene el 10 de Ag. de 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 comentario
Oleg Komarov
Oleg Komarov el 10 de Ag. de 2011
Usually you cannot connect 64bit MATLAB to 32bit SQL but I guess you managed and this is the result.

Iniciar sesión para comentar.

Respuesta aceptada

Rene
Rene el 10 de Ag. de 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...

Más respuestas (0)

Etiquetas

Productos

Community Treasure Hunt

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

Start Hunting!

Translated by