02-10-2009, 04:33 PM
Hi Friends,
I am trying to connect to a Database and importing Database Data to runtime databale.
But i am getting following error
The test run cannot continue due to a syntax error.
Expected 'Loop'
Line (28): "".
My script is as below
can any one point the issue.
Thnks in advance
I am trying to connect to a Database and importing Database Data to runtime databale.
But i am getting following error
The test run cannot continue due to a syntax error.
Expected 'Loop'
Line (28): "".
My script is as below
Code:
dim con,rs
set con=createobject("adodb.connection")
set rs=createobject("adodb.recordset")
con.open"provider=sqloledb.1;server=xyz;uid=sa;pwd=sa@123;database=First"
rs.open"select * from employee",con
do while not rs.eof
datatable.getsheet(1).addparameter"Eid",""
datatable.getsheet(1).addparameter"EName",""
datatable.getsheet(1).addparameter"Salary",""
datatable.getsheet(1).addparameter"DID",""
row=1
do while not rs.EOF
databale.setcurrentrow(row)
datatable.value(1,1)=rs.fields("Eid")
datatable.value(2,1)=rs.fields("EName")
datatable.value(3,1)=rs.fields("Salary")
datatable.value(1,1)=rs.fields("DID")
row=row+1
rs.movenext
Loop
can any one point the issue.
Thnks in advance