How to get the column count and column name from the
resultset in the database connection program?

Answers were Sorted based on User's Feedback



How to get the column count and column name from the resultset in the database connection pro..

Answer / ram

you use following sql query

select column name, count(column name)from table name.

Is This Answer Correct ?    3 Yes 3 No

How to get the column count and column name from the resultset in the database connection pro..

Answer / tvsrkc

we can get the column count by following code
------------------------------------------------
set colcoll=rs.fields
colcnt=colcoll.count
for i=0 to colcnt-1
msgbox rs.fields(i).name
rs.movenext
next

Is This Answer Correct ?    2 Yes 2 No

How to get the column count and column name from the resultset in the database connection pro..

Answer / mahesh

select count(column name) column name from the table.

Is This Answer Correct ?    1 Yes 2 No

How to get the column count and column name from the resultset in the database connection pro..

Answer / nageshbijoor@gmail.com

you can get column count using following code
totalrec = 0
DataTable datatable
datatable = ds.Tables["tablename"]
totalrec = datatable.Rows.Count
Label1.Text = datatable.Rows[currrec]["columnname"].ToString
()

Is This Answer Correct ?    3 Yes 4 No

How to get the column count and column name from the resultset in the database connection pro..

Answer / krishnat.qa

we can get the column count by following code
-----------------------------------------------------
set colcoll=rs.fields
colcnt=colcoll.count
for i=0 to colcnt-1
msgbox rs.fields(i).name
rs.movenext
next

Is This Answer Correct ?    1 Yes 3 No

Post New Answer

More QTP Interview Questions

actually how many hours per one day we will work on automation (qtp) in real time

1 Answers   Synechron,


iam have done mba(finance)in 2008. in 2008 one reputed consultancy came off campus interview our institution. i got job as "manual test engineer". now iam working as "manual testing engineer". now my problem is when iam going interview the interviewer asking like " ur mba gradute how can u get job in test engineer." this question i have faced every interview. iam explaining how iam getting job. but they are not trust me". pls tell me answer how i am giving relavent ans.. this is my mail id y.ramana84@gmail.com

0 Answers  


Any one please tell me how to create framework in QTP (in detail). Is there any website for reference?

1 Answers  


What is throw object?

0 Answers  


What is meant by virtual obj and Y do v need virtual obj configuration.

4 Answers  






how to retrieve the xml file data through qtp. can anybody send script for this..

3 Answers   Synechron,


What is difference between Class and MicClass

2 Answers  


On the website, the protocol has been changed https: to https what you will do? Tell me your approach?

0 Answers  


what is active screen,keyboard view?

2 Answers   BirlaSoft,


How to use reporter.report event in qtp ?

0 Answers  


we have 5 default properties we want add more Default property in Object Repository how to add the property

2 Answers   Nous,


Explain the Load testing process?

1 Answers   Crea,


Categories