LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Problem with special characters in a column

Solved!
Go to solution

Hello, I call a data from a database and I do not have the rights on the database, the name of the columns have points in there name: Parameters.12V_Prog_IccType_A

Is there a way to solve this problem with out changing the name? Like using (), [], "", or something like that?

 

BR,

Robin

0 Kudos
Message 1 of 9
(3,625 Views)

I didn't get properly what you are trying to do!

-what are points?

-If you want to search and replace in string use this: http://zone.ni.com/reference/en-XX/help/371361M-01/glang/search_and_replace_string/

Thanks
uday
0 Kudos
Message 2 of 9
(3,622 Views)

Hello thanks for your fast answer,

 

I mean points like this "." Parameters.12V_Prog_IccType_A.

Calling a column from a database with the DB Select Tool Kit, when I use this column it send me an error, but with all others the columns with out "." or "_" in characters it works, I am sure my problem is that point, but I can not change the name of the column in the table.

 

I can not replace the char in string or the name of the column will be incorrect.

 

 

0 Kudos
Message 3 of 9
(3,617 Views)

Did you try putting the appropriate column string identifier around the column name? For MS-SQL I think it's a `, for MySQL I think you can use either " or '.


LabVIEW Champion, CLA, CLED, CTD
(blog)
0 Kudos
Message 4 of 9
(3,608 Views)

The database using SQL server, I tried with " ", [ ] and ' '.

With ' ' it do not send me the value and send me the name of the column that I write in LabVIEW.

 

For example: 'Parameters.12V_Prog_IccType_A' -> Parameters.12V_Prog_IccType_A

And if the column does not exist it send me the name I entered anyway.

 

Do you know what can I use for SQL Server?

0 Kudos
Message 5 of 9
(3,604 Views)

@Sam_Sharp wrote:

For MS-SQL I think it's a `


A ` is different to a ' (a subtle difference, but a difference all the same).


LabVIEW Champion, CLA, CLED, CTD
(blog)
0 Kudos
Message 6 of 9
(3,596 Views)

Yes, I tried it and it did not work it say me the name is incorrect near '`'

But it was a good try, maybe something else? I sent a mail to them for changing the name of the columns, but it could be great to know what specific character I can use to make special character ok.

 

I had the same problem with the name of the table: Tests.Step1 but I just used " " and it works maybe LabVIEW can not do the same with columns?

0 Kudos
Message 7 of 9
(3,592 Views)
Solution
Accepted by topic author Robinm76
Try the square brackets.

Mike...

Certified Professional Instructor
Certified LabVIEW Architect
LabVIEW Champion

"... after all, He's not a tame lion..."

For help with grief and grieving.
Message 8 of 9
(3,589 Views)

Everytime the good answer Mike! Thanks I understand now why it did not works the first time I used square brackets, I was using a string to pick the data in, and that was a float, but with the other error I never saw that problem. Great thanks for your help guys.

Best regards,

Robin

0 Kudos
Message 9 of 9
(3,579 Views)