03-02-2011 08:58 AM
03-03-2011 05:29 AM
Hi Softman,
I would recommend that you post this code on the NI Developer Community as this may be useful for other developers.
Regards,
Christian Hartshorne
NI|UK
03-03-2011 07:02 AM
Hi Christian
Thank you.
Now I know where to post, just posted it there.
03-03-2011 08:38 AM
If you use a Access database the Get property wont work if memory serves, and the double loop is overly complex, you only need the variant to string in the middle. 🙂
/Y
03-03-2011 08:43 AM
Hi
Thanks for your comments
I use MSSQL only but am interested in what you say, need examples to understand more.
03-03-2011 09:18 AM
Then i can tip you about Column named which includes spaces ... the default kit doesn't work and 'fixing' it to add '[' and ']' (as i did) isn't quite recommended as there's no SQL standard for such. 🙂
/Y
03-03-2011 09:56 AM
Er don't know what you mean, just tried my routine with spaces in column names and it worked fine
Top row is column names from the SQL database.
03-03-2011 10:28 AM
Does it also work if you do a Select with those column names? It might have been changed in later versions, but it caused me alot of head ache in 8.2 when it happened. 🙂
/Y
03-04-2011 03:13 AM
Well here is an interesting thing
The Select
Causes an error here
Error being
As you can see it can be trapped out, but still runs to produce the list
But as you can see there is now a fault with the column names, as it has returned all the column names but I only wanted what was in the select
'SELECT [Primary Version],[Minor Version],TPname FROM TestPrograms'
I need to do a bit more work on how it returns only the columns you select, but it is working for the project I am doing so working on it again to fix the issue of selecting columns over return all ('Select * FROM TestProgram') will have to wait 😉