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
Example
DB_Connect=CreateObject(ADODB.Connection)

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.
outResult1=rsOut("col1")

outResult2=rsOut("col2")

rsOut.movenext
End If

End Function

Is This Answer Correct ?    4 Yes 0 No

Post New Answer

More QTP Interview Questions

What is the extension of the recovery scenario file in qtp?

0 Answers  


What are main panes available in qtp test browser?

0 Answers  


How to test fly out menu in qtp?

0 Answers  


how to test a java project throughqtp?while testing a vb project we generally do vb scripting. but while testing java project do we use java script .plz some one can send me the manual for it my email roy_samata@yahoo.com thanks in advance

1 Answers  


Please provide specific examples of advanced/creative usage of QTP, including how impact & benefits for your project

0 Answers   T Mobile,






How many types of parameters are available in quicktest professional (qtp)?

0 Answers  


How to check the URL using Automation tool QTP

2 Answers  


Hi all, what is the latest version of QTP?

20 Answers   CTS,


Dear Friends, I having total 3+year experience in manual testing including automation testing QTP, if i am attending any interview what kind of question will i get? please help me out

0 Answers  


How can we disable popup blocker? (I think it means when we get a pop up messge(its error) how we wil disable that one with out interrupting normal process)

6 Answers  


Is it mandatory to know abt regular expression in descriptive programming

2 Answers  


what are the difference ways of parameterising?

1 Answers  


Categories