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

How do you do batch testing in QTP, if so explain?

2 Answers  


I encountered with very strange problem in qtp while writing the script i written the code window"regexpwndclass:=XLMAIN").window"regexpwndtitle:=Open" ).Exit this code was working fine for about 10-15 times i executed the script but after some time qtp started giving the error with the same code the error is "Object doesnt support this method or function window(...).window(..)" then i modified the code with only window"regexpwndtitle:=Open").Exit in place of window"regexpwndclass:=XLMAIN").window"regexpwndtitle:=Open" ).Exit now again its working fine i cannot understand what thing is creating the problem if same code executed successfully in starting for about 10 times then why it is giving the error now can anyone give the reason .

0 Answers  


How to call .vbs functions in QTP? plz Explain indetail

4 Answers   Wipro,


What is Performance testing?

2 Answers   Crea,


take one exmple and write on that discriptive programe in qtp?

1 Answers  






hi i have one isuue on selecting webcheckbox .there are 15 wecheckboxex i want to select every time 9 th one how can i select plese help me regards balaji

4 Answers  


who will distribute the project modules for testing in testing team ?

2 Answers  


New to QTP: In a qtp flight booking application, I tried to parameterize the to and from drop down lists using data table, depending on ur drop down selection it will pop up a list of flights. Here I am not finding a way to select flight randomly from given list... Thanks in advance guys.

1 Answers  


Can we directly start working with QTP without any knowledge on WinRunner? (After getting trsining on QTP)

1 Answers  


How to convert manual test cases to automated testcases

1 Answers   TCS,


How to capture all the data of a webtable, weblist and combolist using QTP?

0 Answers   ITC Infotech,


Hi all, In Every interview interview asking one question what type of challenges you have been faced in your project?

1 Answers  


Categories