Follow Our FB Page << >> for Daily Laughter. We Post Funny, Viral, Comedy Videos, Memes, Vines...

How to connect to data base?

Answers were Sorted based on User's Feedback

How to connect to data base?..

Answer / jayadev acharam

Using ADODB Object

Is This Answer Correct ?    4 Yes 0 No

How to connect to data base?..

Answer / akshay

Public Function database(Str,SQLstr,outResult1,outResult2)

'//Variable Declarations
Dim objConn, rsOut

'//Create a connection object.
Set objConn = CreateObject("ADODB.Connection")

'//Create a ResultSet Object to store the results.
Set rsOut = CreateObject("ADODB.Recordset")

'//Open the Created Connection object
objConn.Open Str

'//Pass the SQL query string and retrieve the Results
through the connection object
rsOut.Open SQLstr,objConn

If rsOut.EOF <> True AND rsOut.BOF <> True Then

'//Store the different column values
retrieved from a record in different variables.


End If

End Function

Is This Answer Correct ?    4 Yes 0 No

Post New Answer

More QTP Interview Questions

Pls answer this: What is the difference between a subroutine and a function? A. A subroutine can call itself; a function cannot B. A function returns a value; a subroutine cannot C. A function can accept arguments; a subroutine cannot. D. A subroutine can call other procedures; a function cannot.

1 Answers  

hi guys we r working in office...we write some scripts..suddenly we have a work(5min only) in out side..what will do now,,,used to system shut down or log off or lock or sleep mode,switch use or hibernate?

0 Answers  

What is iteration? How it is related to Test Results in QTP

3 Answers   Virinchi Technologies,

what is the use of descriptive programming in QTP ? when we need to use DP? can we test the application completely with out useing DP?? please explan with example

2 Answers  

Tell some commonly used Excel VBA functions?

0 Answers  

Explain the concept of how quicktest professional identifies object?

0 Answers  

What are the most frequent errors you faced while executing your scripts?

1 Answers  

What is the diffrence bettween QTP 9.0 and QTP 9.1?

1 Answers  

More details about keyword driven technique in QTP

1 Answers   TCS,

How we can test a Frame in a web page?

1 Answers   eMids,

How to get the column count and column name from the resultset in the database connection program?

5 Answers   TCS,

What is difference between design time and run time data table?

0 Answers