what is the Vbscript to connect Database

Answer Posted / purshottam swarnkar

function Connect database
set con= create object("Adodb.Connection")
set rs=create object("Adodb.Recordset")
con.provider = "microsoft.jet.OLEDB.4.0" '@ For MS access
con.open="Path of Database"
rs.open "select * from xxxx", con
do until re.eof
end function

Is This Answer Correct ?    1 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are the features supported by UFT?

836


Where to use function or action?

849


What is the quicktest professional testing process?

791


How will we compare the texts in the two word files using QTP writing the script in Descriptive Programming. Thanks

1757


What are some test assets and related extensions of qtp?

759


What is clean sweep?

1584


If you giving priority as p0, as a developer if I give priority as p2, What happens In user defined function ?

815


What are the features and benefits of quick test pro (qtp 8.0)?

785


can any body plz help by sending the qtp docs and qtp ppt's? this is my mail id:murali.padeti@gmail.com

1966


How to find Operating system information using QTP script?

740


How should I click on the right click menu objects When I trying to add the object properties to the OR.It is showing only Window(Window).Not all the objects of the window. Also while recording I found No script. How to solve this>.

1731


How to read a text file from QC using QTP. I would like to do something like this. But instead read a file from QC and NOT from my local drive. Set fso = CreateObject("Scripting.FileSystemObject") Set InputFile = fso.OpenTextFile("C:\test.txt", ForReading) Thanks

2984


give me an example where u used good judgement and logic in solving a problem

3555


How to test fly out menu in qtp?

696


On the website, the protocol has been changed https: to https what you will do? Tell me your approach?

782