Get data from database In UFT

UFT Tool Installation, Tool Settings, Recording Modes, Checkpoints, Output Values, Step Generator, Data Table, Object Repository and UFT Actions.
Post Reply
swathi
Posts: 134
Joined: Fri Nov 23, 2018 2:52 am

Get data from database In UFT

Post by swathi » Wed Nov 28, 2018 7:00 am

how to get data from database In UFT ?

AyubHussain
Posts: 142
Joined: Fri Nov 23, 2018 2:48 am

Re: Get data from database In UFT

Post by AyubHussain » Wed Nov 28, 2018 7:00 am

Follow the given below code to get data from database −

Set db = createobject (“ADODB.Connection”)
db.Open “Provider = Microsoft.Jet.OLEDB.4.0;Data Source=G:\guru99\vb6\admission_project.mdb;
Persist Security Info = False”

Set rst = createobject (“ADODB.Recordset”)
rst.Open “select*from Course”, db, 3
id = rst. RecordCount
For i = 0 to id-1
Print rst.field (0) & rst.fields (1) & rst.fields (2) & rst.fields (3)
rst.Movenext
Next

Post Reply

Return to “UFT Fundamentals”