LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Database Toolkit Unescape Characters

Solved!
Go to solution

Hi guys,

 

I am working with the Database Toolkit with SQLite and MySQL (i'm migrating right now) and I am having a kind of annoying issue with the Execute Query VI.

 

In SQLite, if i give it a string to its API to write it to the DB, it will just write that string to the DB. In MySQL, using the Database Toolkit Execute Query VI, if i give it a string, it first looks for all escaped (\) characters and removes the \. When you query that column, its missing all the intended \ characters (since it was written without them) which its being handled by my calling code. I would like this to not happen and for it to just write the raw string to the DB. 

 

Has anybody ever encountered this? Is this a toolkit 'feature' or something on the server side? I'm not doing parameterized queries, only a simple format to string and execute query.

0 Kudos
Message 1 of 3
(2,939 Views)

There is a Hidden Gem VI called Escape String.  It basically replaces a backslash with a double backslash.  This should fix your issue. 

aputman
------------------
Heads up! NI has moved LabVIEW to a mandatory SaaS subscription policy, along with a big price increase. Make your voice heard.
0 Kudos
Message 2 of 3
(2,931 Views)
Solution
Accepted by topic author Lee_Denaro

Writing this all down actually made me think it could be a server side issue and turns out it is. if anybody is interested, heres the link on the MySQL website

 

Thanks rubber ducks!

0 Kudos
Message 3 of 3
(2,928 Views)