There r 1000 rows and 1000 coloums , in that I want pickup a
name of the coloumn , pls dont say in sql statements , in
interview one of the interviewer said it was a wrong answer
pls any send me answer its urgent



There r 1000 rows and 1000 coloums , in that I want pickup a name of the coloumn , pls dont say in..

Answer / ashok kumar

src = "DRIVER=SQL Server;SERVER=<ur
server>;UID=<username>;PWD=<password>;DATABASE=<database>"
Set dbconn = CreateObject("ADODB.Connection")
dbconn.Open src
Set dbrecset = dbconn.Execute(query to connect table)
For i = 0 to dbrecset.Fields.Count-1 'to get total col. count

Print dbrecset.Fields(i).Name 'to print col. name

Next

Is This Answer Correct ?    1 Yes 3 No

Post New Answer

More QTP Interview Questions

What is the syntax to call one action in another?

0 Answers  


Hi,All How to change background color of a cell in excel using qtp and that too with out using Excel Object.(I am importing the excel sheet by using ImportSheet method)

1 Answers  


What does VBS file contain..? what is VBS file.?

4 Answers  


I am getting the "test object property" Description properties "toolkit class" value By using "gettoproperty" in run time But my problem is how to get Ordinal Identyfier's type and value Type is index, value is 0 How can i keep this values in to required place How can i get these values in runtime I have to insert these "index" and "value" into another area Is there any script for this like "gettoproperties","Getroproperties" If anybody knows,please help me .

0 Answers   Livetek,


does the vb script knowledge is mandatery in testing using QTP

1 Answers  






can we run the scripts of qtp 8.2 in the qtp7.0?

2 Answers  


I am using excel sheet to export data to QTP but it selects just one row of data from excel sheel how to import all rows of excel sheet to QTP during runtime

10 Answers   IBM, Wipro,


In QTP if u got a defect , how to report to developer using Test director or Quality center .

5 Answers   Wipro,


What is the extension of qtp local repository?

0 Answers  


Which functionalities of QTP used in banking project?

0 Answers  


Is there anyone can tell me where I can download free or trial QTP? I tried HP website, it was not there anymore. If someone know, pls send me URL. Tks...

1 Answers  


How to execute a WinRunner Script in QTP?

1 Answers   Crea,


Categories