07-26-2016 06:18 AM
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
Solved! Go to Solution.
07-26-2016 06:24 AM
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/
07-26-2016 06:30 AM
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.
07-26-2016 06:35 AM
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 '.
07-26-2016 06:46 AM - edited 07-26-2016 06:47 AM
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?
07-26-2016 06:53 AM
@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).
07-26-2016 07:04 AM
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?
07-26-2016 07:08 AM
07-26-2016 07:25 AM
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