How to retrieve the data from database?

Answer Posted / asn

dim con,cmd
set con=createobject("adodb.connection")
set com=createobject("adodb.command")
con.open"provider=sqloledb.1 or ora
oledb.1;server=servername;uid=uid;pwd=password;database=data
sourcename"
cmd.activeconnection
cmd.execute"select*from tablename"

Is This Answer Correct ?    1 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Hello everyone! I am just writing a small test for a windows application. I have a problem with a text output value. The value i am trying to catch is presented in a scrollable textbox. When the text is too long, only a portion of it gets captured. Do you have any experience with this?

2352


How does quicktest professional (qtp) identifies the object in the application?

772


What are the different types of qtp test assets and their extensions?

856


Explain the terms test and business component?

765


How we can import data from database?

897


Is it possible to use two instances of UFT on the same machine? If not why?

827


What is expert view and keyword view?

855


What is the difference between qtp and selenium?

761


how to idetfy which test cases are automated?who will deside that plz tell me

1755


How can we extract data like "Details","Result","Time" from the 'Run Error' result generated in QTP after run time errors are generated during a run & import the details etc...into excel sheet

1792


How to give a call to another action from one action?

851


What is checkpoints for quicktest professional (qtp)?

775


I am in .Net development for past 3.5 years and want to enter in to automated testing and learn QTP. For this I need some good tutorial for beginners. I will be really greatful if any one has and they can send it to me on this address- ruchidureja@gmail.com

1717


in qtp 3 sheets is there in data table like global, action1, action2. I want to check the rows and columns in action2. how can check using script?

6735


How to analyzing test results using quicktest professional?

884