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

What are the differences between QTP 9.2 and 10? please explain e indetail......

2 Answers   Wipro,


For what purpose to we use object repository in a application?also explain usage of obj.repository?

3 Answers  


what is meant by automation tool?

1 Answers  


What is wrong in my code?

3 Answers  


How to Import data from a ".xls" file to Data table during Runtime.

1 Answers  






how many wayes we do the parameterization?

1 Answers  


What are the views available in quicktest professional?

0 Answers  


hello, i just started searching for a job on QA ,need QTP software full version.plz can any body help me...my email id is padma_ub@yahoo.com.thanks in advance.

0 Answers  


How does QTP identifies the object in the application?

1 Answers   Crea,


RECENTLY I PLACED IN QTP..HOW TO IMPROVE VB SCRIPTS KNOWLEDGE? IAM STRUGGING TO WRITE THE AUTOMATION SCRIPTS? ANY BODY TELL HOW TO IMPROVE QTP SCRIPT SKILLS?

0 Answers  


whenever a scenario is recorded ever, it creates a object repository automatically (‘per action’ /local ). we do not need to make them individually…then why we need a shared object repository. How it will be practically utilized ?? your input will be highly appreciated..

5 Answers  


Hello Everybody, please tell me how to use accessibility checkpoint and XML checkpoint by giving any practical example of it.please provide me the steps to perform that and also pls provide the code too. Thanks in advance, Gaytri

1 Answers  


Categories