LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

String data from a multi-line control loads incorrectly after retrieving from database. It seems it messes up the array.

I have noticed that when a string control allows multiple lines, it passes to the database (MS-Access) the �new line character� as �another character�. When it retrieves the data back from the database, those characters are loaded differently from the original.

If it is used an array to store the retrieved data, those characters act splitting the cell of the array where the original �new line character� was originally placed.

I guess I should correct the way the data is stored. Checking the database those �new line characters� are incorrectly displayed.

I would appreciate any lights on this matter.

Best regards.
Mauricio Vidal
VIDAL & ASTUDILLO Ltda.
http://www.vidalastudillo.com
0 Kudos
Message 1 of 6
(2,992 Views)
I am not sure I understand the question. What exactly do you mean by "another character"? Can you just replace the "another character" with a new line when you read the string in using the search and replace function?

If not can you include a really simple VI that sends data to an database and then reads it right back, showing us what you see? Save the front panel results as defaults so we are sure to see what you see.
0 Kudos
Message 2 of 6
(2,992 Views)
Evan,

Thank you for your message and sorry for the delay.

Actually I have noticed that my problem is related to the data that labview passes to the database. As it uses SQL sentences to store and retrieve data between the control and the database, they are quite sensible to the characters it uses to store data.

What I have called "other characters" are the return, line feed, tab, and others... SQL sentences in my case behave incorrectly when thos characters are used.

I'll keep looking for a way to manage it.

Thanks again...
Mauricio Vidal
VIDAL & ASTUDILLO Ltda.
http://www.vidalastudillo.com
0 Kudos
Message 3 of 6
(2,992 Views)
Hi,

What interface do you use (e.g. SQL toolkit)? I've run into this problem
too.

Regards,

Wiebe.


"jmva" wrote in message
news:5065000000050000007C300100-1066448259000@exchange.ni.com...
> Evan,
>
> Thank you for your message and sorry for the delay.
>
> Actually I have noticed that my problem is related to the data that
> labview passes to the database. As it uses SQL sentences to store and
> retrieve data between the control and the database, they are quite
> sensible to the characters it uses to store data.
>
> What I have called "other characters" are the return, line feed, tab,
> and others... SQL sentences in my case behave incorrectly when thos
> characters are used.
>
> I'll keep looking for a way to manage it.
>
> Tha
nks again...
0 Kudos
Message 4 of 6
(2,992 Views)
Wiebe:

I'm using LabSQL (http://www.jeffreytravis.com/lost/labsql.html) instead the SQL Toolkit from National.

I'm still doing some workarrounds on this... I'm triyng to identify if it is possible that the database engine is the responsible of the change on the characters... still I have no conclusion.

Regards,
Mauricio Vidal
VIDAL & ASTUDILLO Ltda.
http://www.vidalastudillo.com
0 Kudos
Message 5 of 6
(2,992 Views)
I have found out that the problem was generated via the ADO connection which passed incorrect data to the database... Labview control was performing the actions correctly.

The most recent version of LABSQL fixes this problem.
Mauricio Vidal
VIDAL & ASTUDILLO Ltda.
http://www.vidalastudillo.com
0 Kudos
Message 6 of 6
(2,992 Views)