Hi Suresh, I Think you have missed quotation end. try this below query. "select * from createtable where Test_case_id =" &TestCase& "" ,db
On Fri, Apr 6, 2012 at 7:42 PM, Suresh Pandian <[email protected]> wrote: > Hi all, > > I just ran a query to fetch records from the ms access database, i > used variables for the condition > > Set db = CreateObject("ADODB.connection") > Set rs = CreateObject("ADODB.recordset") > db.connectionstring="dsn="&Dsn_Name > db.open > > rs.open "select * from createtable where Test_case_id =" &TestCase,db > > this returns the below error. > > [Microsoft][ODBC Microsoft Access Driver] Too few parameters. Expected > 1. > Function file: \.....\Library\common_functions.vbs > Line (174): " rs.open "select * from Createnewuser where Test_case_id > =" &TestCase,db". > > when i hardcode the value like rs.open "select * from createtable > where Test_case_id = '5454'" ,db then i am getting the record > > Any help is appreciated. > > -- > You received this message because you are subscribed to the Google > "QTP - HP Quick Test Professional - Automated Software Testing" > group. > To post to this group, send email to [email protected] > To unsubscribe from this group, send email to > [email protected] > For more options, visit this group at > http://groups.google.com/group/MercuryQTP?hl=en > -- You received this message because you are subscribed to the Google "QTP - HP Quick Test Professional - Automated Software Testing" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/MercuryQTP?hl=en
