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

How to modify object property in qtp ?

0 Answers  


How to find the difference between 2 dates in qtp?

0 Answers  


How to handle Java tree in QTP?

0 Answers  


Shall we add Local Repository to shared object repository,if yes,how we add

4 Answers  


when i was doing the Flight reservation with QTP calculating the tickets i got Type mismatch: '[string: ""]' in "If cdbl(tot)=cdbl(p)*t Then" error. where I am doing the mistake Could you please tell me.

5 Answers  






Hello Friends, I am working with QTP 9.2 descriptive programming. Can you please let me know how to work with below. Browser is IE, for my site, it opens another page with different browser name, For example Parent Page is google.com and child page is inteview questions. How to work with this second page.

3 Answers  


How can we upload pdf files in qtp?

1 Answers   Syntel, TCS,


3. How to handle the exceptions using recovery secnario manager in Qtp?

2 Answers   Wipro,


What is API?

1 Answers  


waht is the diff b/w Environment variable and Global variable in qtp?? explain types of variable in qtp??

5 Answers  


Is it mandatory to know abt regular expression in descriptive programming

2 Answers  


Explain in brief about the quicktest professional automation object model?

0 Answers  


Categories