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

How can you capture(Read) the values from a Table?

1 Answers  


What are the different recording modes?

0 Answers  


How to map the test cases to requirements in QC?

4 Answers   IBM,


In Webtable New rows getting added, we have select the name as Sandeep ,If name column is sandeep then need to check the checkbox ,we don't know the rows and columns ,Can anyone please tell me the answer.

3 Answers   Broadridge, Cigniti Technologies, HCL,


how can we call an external library file in QTP apart from using the Executefile statement..?? is there any other way we can call the external library file in QTP..??

2 Answers   DST Global Solutions,






What is the difference between QTP 8.2 and QTP 9.2

1 Answers  


How to covert a String to an integer?

5 Answers  


What is the QTP test frame work?

3 Answers   IBM,


What is a data driven test in qtp?

0 Answers  


Hi Sudhananda, plz send me the QTP framework with any diagram and PPTS . I want to switch to automatio, I done QTP from professional person, but he does not give me his knowledge properly. so pls help me Thaks send me on following address mirajkar.akash@gmail.com

0 Answers   TechSoft,


how to upload an excel sheet to quality center?

1 Answers  


How will you handle the situation when object is not captured during record?

12 Answers   AZTEC,


Categories