There is a table with 4 columns and 10 rows, how to write the
script to display the first column records using qtp? can
anybody help me with script?
Answer Posted / manas
Dim Conn, rs, ListOfRecords, x
' Connect to the Microsoft Access Database by createing a
object
set conn=CreateObject("ADODB.Connection")
conn.Provider="Microsoft.Jet.OLEDB.4.0"
conn.Open "c:/DataBase1.mdb" ' ex: Name of DataBase is
DataBase1.mdb
' Retriving data from Access using the SQL Query
' Column_name1 - Suppose first column
' Table - Suppose Name of Table
set rs=CreateObject("ADODB.recordset")
rs.Open "Select Column_name1 from Table", conn
for each x in rs.Fields
ListOfRecords = ListOfRecords & x.Column_Name1 & vbCrLf
next
MsgBox ListOfRecords
Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
Hi All, I Want To excute scripts batch without using QC .I need code for that Thanks Balaji
Explain how you can find the absolute value of the number in qtp?
i have two questions for regular expression :- Q1. I have date pattern eg-29/11/2011 29-11-2011 29.11.2011 Que- if any separator is there between date,month and year pattern should match else it should not match eg- pattern should not match in case of 2911-2011 Q2. let say i have a string and there is a number in between of that string eg.-Amount 30002.234 successfully credited to your account . now i have to match this pattern in such a way that even if decimal is not there pattern should match ,how i will do this using regular expression
Which advantages helping QTP to hold the position of "Market Leader" for such a long period?
Difference between action & Reusable action?
Get the count of files of similar types from a folder.
Where to use Property Let, Property Get, Property Set in UFT
Which environments are supported by hp qtp?
how will you check how many members visited the website www.infosys.com?
Generic function to search for the unique link in webtable and click on it
after click on compose mail how can we attached a file in qtp with vbscript code
what type of framework u r using in ur organization
How can I open a EXCEL file from QTP Resultviewer with reporter.ReportEvent function call. Example: Test files for details click "here". And clicking "Here" in the resultviewer will open a local EXCEL FILE.
Can UFT be connected to Quality Center? If ‘Yes’ brief the process or steps.
Can we record using all the modes in a single script? Explanation with example is appreciated