Forum Discussion
tristaanogre
14 years agoEsteemed Contributor
You'll need to do something more like the following
Because CASID and DDE_Updated_Value are variables only in the context of the script, you need to concatenate them as strings into your query.
Qry.ConnectionString = "Provider=SQLOLEDB.1;Integrated Security=SSPI;Persist Security Info=False;Initial Catalog=Agresso_QA;Data Source=GLNWD021\QA"
' Specify the SQL expression
Qry.SQL = "Select * from Aq1lookupalarapart where apar_id= " & CASID & " and dde_level_over="& DDE_Updated_Value & " order by last_update desc"
' Execute the query
Qry.Open
' Process results and insert data into the test log
Qry.First
While Not Qry.EOF
Log.Message Qry.FieldByName("apar_id").Value
Qry.Next
Wend
Qry.Close
Because CASID and DDE_Updated_Value are variables only in the context of the script, you need to concatenate them as strings into your query.
Related Content
- 2 years ago
- 9 years ago
Recent Discussions
- 2 days ago
- 2 days ago
- 6 days ago