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 On Error Resume Next ?

4 Answers   Accenture,


write qtp descriptive programming to activate multiple notepads? please urgent friends

1 Answers   TCS,


what is automation(qtp)bug pls giv me one ex?

1 Answers  


Have you used TD?

2 Answers  


We have a dynamic webtable where rows keep on adding.I have to click on particular row where the status changes to Update or Save.How do you click on Status(either it can be Update or save)

2 Answers   IBM, Infosys,






what is the long form of QTP ?

2 Answers  


I have java based application on my computer. Can I install QTP on it? What are system requirements for installing QTP?

3 Answers  


why text area checkpoints cannot used for web applications

0 Answers  


I want to do QTP Certification what is the pattern of Question paper.

0 Answers  


Could you please explain me about QTP framework.

2 Answers   Oracle,


How did you use regular expressions in QTP and also in WR?

0 Answers  


Is there is any method how to connect remote desk throw QTP if yes please answer with a example?

3 Answers   HP,


Categories