03-09-2006 10:13 AM
Yes, you've reminded me that Access changes its options depending on what kind of DB it's connected to.
I believe you need to go into the design view of the query and then click the down arrow which will appear on the leftmost button in the toolbar (it's probably Display or View or something like that) and there you should have the SQL view option. It's probably also accessible through the display menu (if there is one).
03-09-2006 01:28 PM
Hello, tst,
Thanks for your patience and help. I am sure it has been tested by simple and maybe silly questions like mine above. Thanks for helping anyway:).
I got sql query it to work for my vi.
I wanted the indicator to reflect the whole data in ascending/descending order depending on column queried. But there is an issue.
Now my question is if I use fetch.vi and have my type as an array constant and my indicator as an array indicator why is my vi showing error. It makes no sense. Any insight.
By the way I am using Database Connectivity Toolset to get the fetch.vi feature.
Thanks in advance for any help.
03-09-2006 03:23 PM
If you give no details and post the question twice you're really not making me want to help you.
The least you should do is post the code, explain what you're expecting to get and what error you're getting.
03-10-2006 10:38 AM
Hello, tst,
Thanks for your patience and help.
I posted twice because I though the question was somewhat different. Sorry about the tediousness of it all.
I have posted a vi that shows my sorting my data. It works well and does what I want, but it does not show all the data when I sort. It gives only one answer instead of all the data in ascending/descending order.
Thanks for sticking around to answer my question.
By the way, the fetch.vi is from the Database Connectivity Toolset
03-10-2006 11:00 AM
03-10-2006 11:27 AM
03-10-2006 12:06 PM
None of that syntax is correct. It doesn't appear you did what was recomended at all. The query called sqlquery in your database doesn't use this syntax. Did you just make something up? The query you have in your message doesn't return any data because you say "FROM timmy" and timmy is not a table, it's a column. Also, "select timmy*", etc. is incorrect syntax. If you want all columns, you do a "SELECT *". If you want specific columns, you do a "SELECT timmy, tommy". All that you really have to do is design the query in Access in Design View, test it, and then switch to SQL VIEW and copy the text from the SQL window into your LabVIEW program. If you had done that, you would have had this query:
SELECT jenny.timmy, jenny.tommy, jenny.theodore
FROM jenny
ORDER BY jenny.timmy, jenny.tommy, jenny.theodore;
If you want to explicitly add the ASC keyword after jenny.timmy AND jenny.tommy AND jenny.theodore, you can do that. The default is ASC.
03-10-2006 12:27 PM
Thanks for your patience and I apologize for the confusion.
My syntax for sorting works, I just wrote it wrong in the above post:
"select timmy, tommy, theodore from jenny order by timmy ASC"
The above syntax gives me the query I asked but it only returns only one answer.
I want it to return all the data points in that column timmy in ascending order.
03-10-2006 12:37 PM
03-10-2006 12:54 PM - edited 03-10-2006 12:54 PM
@Dennis Knutson wrote:
Since this query works in Access, then I can only conclude that you've got something wrong with the DCT functions and I can't run these since I don't have the toolkit. Something looks a little weird though. You've got a function called fetch binary data but the columns in the database are DBL. And what is the "0" constant that you have wired to the input of this function? I hope someone with the toolkit can post here with the correct answer.
In fetch.vi, the "0" constant is the column index. There is also an input type definition that determines the variant of the indicator.
I hope someone with the toolkit can post a correct answer also.
But thanks for your time and hopefully an answer is coming.
Message Edited by roboticstudent on 03-10-2006 12:56 PM