how to connect qtp to sqlserver?(if any body know about this please send mail to me:sheik_feroz5@yahoo.com)thank u
Answer Posted / sunita
Dim sServer, sConn, oConn, sDatabaseName
sDatabaseName = "Migrations"
sServer = "hyrdwsz0010"
Set oConn = CreateObject("ADODB.Connection")
oConn.Open "provider=sqloledb;data source=" & sServer & ";initial catalog=" & sDatabaseName &";Trusted_Connection=Yes;"
oConn.CommandTimeout = 0
Set oRs = oConn.Execute("Select * from dbo.CLIENTLISTSS")
Set RowCount= oConn.Execute("Select Count(*) from dbo.CLIENTLISTSS")
Msgbox FormatNumber(RowCount(0),0)
Msgbox oRs.Fields.Count
Msgbox oRs.Fields.item(1)
arraydata=oRs.GetRows
Msgbox arraydata(1,1)
Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
What are the different types of checkpoints?
1.Write a CRITICAL test cases for calculator ? 2.What is the difference b/w FRS and SRS documents ? 3.What is Component ? 4.What is object ? 5.what is the difference b/w static and dynamic descriptive programming ?
what is the difference betn QTP 8.0 AND PREVIOUS VERSION
Differences between text and test area checkpoints?
This is a question thats generally asked in every QTP interview. What were the problems that you faced during automation and how did you resolve them?
Is there anyway to automatically update the Datasource name in Database Checkpoints object when we migrate tests to a new release?
How does you pass optional arguments in qtp?
What is test object model in quicktest professional?
What is difference in global and action sheet in qtp?
Explain types of descriptive programming?
What is contained in the object repository?
When do go for loop condition in test?
How to get the format of a webedit class in qtp. How can i know that particular webedit accept what type of format like "mm/dd/yyyy" or "$" or Alphanumeric
what type of run time errors you get while you ar edoing rpg program?
How can i initiate the objects to find uniquely in OR