09-08-2011 04:59 AM
i use this sentence to get the data from my database, "select * from datalogging WHERE datalogging.utctstamp>15684000&datalogging.utctstamp<15686000", i insert this sentence into labview DB tool execute query module and then use DB tool Fetchl recordset module from labview to get the data, however, the labview wait infinite time and then crashed.
can somebody help me?
09-09-2011 09:52 AM
Hi,
I think the first sub-vi returns an error (Open connection).
There are 2 ways to connect to a database :
The easyest is to use a .udl file (search on your hard drive C:\, you will find a Labview.udl) This file will help you to connect you to database : there is a button to test connection, ant if this doen's success, it's useless to continue with labview... When ot works, link the path of this udl to the vi connecting to database.
The second way is to use a connection string (try to search SQL connection string on forum, you will find what it looks like), but I don't think omnihpposa is a good connection string.
Just an advice : when you use local variables (such as decimal integer string), you doen't assure data flow : your second query (datalogging) will execute with parameters of the previous recorset of the other database...
Best regards,
09-09-2011 10:32 AM
Try changing the '&' in your query to the word 'AND'. I tested a query in MS Access using both approaches and the ampersand caused the engine to concatenate the search terms and it ended up querying a nonexistent field.