Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


how to connect qtp to sqlserver?(if any body know about this please send mail to me:sheik_feroz5@yahoo.com)thank u

Answers were Sorted based on User's Feedback



how to connect qtp to sqlserver?(if any body know about this please send mail to me:sheik_feroz5@yah..

Answer / rajib

set conn=Createobject("ADODB.Connection")
Srvname="Driver=<>,Server=<>,UID=<>,Password=<>"
conn.open Srvname
Set Rec = CreateObject("ADODB.Recordset")
SQL="<SQL statement>"
Rec.open SQL ,conn

Is This Answer Correct ?    5 Yes 2 No

how to connect qtp to sqlserver?(if any body know about this please send mail to me:sheik_feroz5@yah..

Answer / mahaboob

set conobj=createobject("ADODB.connection")
conobj.open.provider"providername",Datasource="path of file",uid="username",pwd="password"

Is This Answer Correct ?    0 Yes 0 No

how to connect qtp to sqlserver?(if any body know about this please send mail to me:sheik_feroz5@yah..

Answer / 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

More QTP Interview Questions

What is the BPT(bussiness process testing ).and what is the main difference between BPT and QTP

3 Answers   EDS, GL Noble Denton, IIST,


How can we count the no of rows are available in a data table ?

9 Answers   Kanbay,


I have the script like this: Browser("Philips Web Login").Page("Philips CL DMS2 Application").Frame("ScopeFrame").Link("DC3701737 (Active)").Click in which the value "DC3701737" will get changed and i have to use the same value in so many places. If i want to get that value "DC3701737" in to a variable, how? pls let me know if you didn't get the question. Help me out in this.

2 Answers  


Hello friends..... On which areas of an application we can not test with QTP

0 Answers   Thatavarti Technologies,


I want to export the datasheet to excel.Instead of total file it exports only data without headers.How to solve this problem?

1 Answers   FAI,


What is the process of synchronizing qtp and aut?

0 Answers  


How to handle dynamic objects in quicktest professional?

0 Answers  


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

3 Answers   HP,


i have to pass the testcases into userid anf password of gmail login page using functions you can take your own testcaseslike userdid should take only lowerletters it should not take special charactors and uppercase letters and password should take only numericvalues it should not take alphanumeric and alphabets

2 Answers  


can we call a test in another test?

3 Answers   iFocus,


how u will describe testing activities?

2 Answers  


How to watch currnet value of an object like OK buton or edit box with "Agent Name:" label. in watch expression tab?

2 Answers   Cap Gemini,


Categories