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 program..

Answer / punit

in ur mysql database there is 1 database with name
information_schema,
so 1st type,
use information_schema;
inthis data base there is 1 table COLUMNS which contain all
the info related to allthe tables in ur mysql,

so hit the following queri for youe column count:-
select count(*) from COLUMNS where TABLE_NAME='Table name';

Is This Answer Correct ?    0 Yes 1 No

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

Answer / sreeprasad

you use following sql query

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

Is This Answer Correct ?    4 Yes 6 No

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

Answer / uday kumar_anem

Hello friends, just observe the question.

It is not Datatable, it is database connection program.

Say i user "select * from table"

Here i dont know how many col r there in my table.

So give the answer to find the number of columns in that
table.

Is This Answer Correct ?    0 Yes 2 No

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

Answer / sreeprasad

Thanq Akshara..

Is This Answer Correct ?    0 Yes 3 No

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

Answer / akshara

in the vb script we use genralluy to count the rows as
rowcount=datatabble.GetSheet("Sheet name").GetRowCount
MsgBox(rowcount)
i fyou need sheet count
datatable.getcheetcount
Thank you

Is This Answer Correct ?    0 Yes 5 No

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

Answer / prasad

Select column_name, count(column_name) from user_tab_columns
where table_name='EMP' group by rollup(column_name);

Is This Answer Correct ?    0 Yes 5 No

Post New Answer

More QTP Interview Questions

What is descriptive Programming in qtp.

5 Answers  


How to handle Recovery scenario in QTP. give detailed explanation about recovery scenario.

4 Answers   Arsin Systems,


wht is the difference betn check point and output value?

5 Answers   BirlaSoft,


when qtp recognizes a web link like (hyper link)wich properties it is going to take to identify the objects unquely? what is Ini file in QTP?

1 Answers   Symantic Space,


What is the use of "Step Generator" in QTP??for what purpose we are using??explain with an example

2 Answers  


What is keyword driven Testing Framework. Anybody can explain it in details... Pls anybody can give the answer.. Thanks in advance...

1 Answers   Navis,


How to find the name of the machine where you are running your automation scripts in qtp?

0 Answers  


Among the 4 capture levels, Complete, Partial, Minimal, None. which one is mostly used?

1 Answers  


WHAT IS THE DESCRIPTIVE programming when it is useful? & when to use this ?

6 Answers   CTS,


What is the file extension of the code file in qtp?

0 Answers  


What are the types of data tables in qtp?

0 Answers  


In Test Director , You can store Test cases or vb Script . Why we need VSS?

2 Answers  


Categories