06-01-2015 06:57 AM
@HowardB wrote:
So for the select statement, the Labview vi does not use named parameters? So then I must set the parameters in the same order as the ?'s appear?
You may be able to use names of a certain format, like "@abc" in place of "?". It may depend on what SQL database you are connecting to.
06-01-2015 11:16 AM
I was able to use named parameters with an SQL string as follows:
SELECT * FROM TEST_SETUP WHERE OPERATOR LIKE (@operator) AND LOT LIKE (@lot) ;
Then I used the Set parameter vi to set each parameter.
Thanks for the help!
06-28-2016 10:27 AM
06-28-2016 10:57 AM
06-28-2016 11:38 AM - edited 06-28-2016 12:00 PM
Hii Mike
Thank you for reply
I am using acess 2007 database
I want to select the the data in database using string control like "Select Product,Dimension,Weight From ProductInfo where Barcode(string control)=?" and also display the same in front panel table
I am using Database connecting toolkit.
I saw the example of parameterized insert but it didn't help to use parameterized select query and also not to diplay data of parameterized select query
I looked for example on parameterized select query but i didn't get any example.
So pls guide me how to do this. I would like to know other method(if any) to perform same.
If possble pls share a reference vi.
Thank you!!!
06-28-2016 02:21 PM
06-28-2016 02:30 PM
Hii Howard
Thank You So Much!!!!!!!!!!!
05-18-2017 10:18 AM
Does this work if you don't have a parameterized query in Access. I'm using Access 2016 and I can't get this to work.
05-18-2017 12:39 PM
Did you try putting parenthesis around @analysis and @Component?
05-18-2017 12:45 PM
Yes, just did try that. I get the following error.
Error -2147217900 occurred at NI_Database_API.lvlib:Cmd Execute.vi->GetSampleID_FromAccessDB.vi
Possible reason(s):
ADO Error: 0x80040E14
Exception occured in Microsoft Access Database Engine: Syntax error (missing operator) in query expression '1stSampleID = (@1stSampleID) and Analysis =(@Analysis) and Component = (@Component)'. in NI_Database_API.lvlib:Rec Create - Command.vi->NI_Database_API.lvlib:Cmd Execute.vi->GetSampleID_FromAccessDB.vi