Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Database connection.
#1
Solved: 11 Years, 4 Months ago
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

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
Reply


Messages In This Thread
Database connection. - by sudhirzpatil - 02-10-2009, 04:33 PM
RE: Database connection. - by tarunlalwani - 02-10-2009, 05:27 PM
RE: Database connection. - by sudhirzpatil - 02-10-2009, 05:42 PM
RE: Database connection. - by badri167 - 02-10-2009, 08:05 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  [UFT] Connection String for Oracle robertosalemi 6 12,297 01-15-2016, 04:51 PM
Last Post: robertosalemi
  DB2 Connect connection with IE 11 SRP 1 2,621 12-18-2015, 12:41 PM
Last Post: vinod123
  IBM DB2 connection with VB script bmurali 2 10,918 12-18-2015, 12:38 PM
Last Post: vinod123
  Connection with HP ALM hachem 0 2,626 02-26-2015, 04:36 PM
Last Post: hachem
  “Cannot connect to 8822 (connection timed out)" Ikbal 0 2,139 12-08-2014, 11:38 PM
Last Post: Ikbal

Forum Jump:


Users browsing this thread: 1 Guest(s)