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

Hi All, I need code for how to execute qtp scripts from excell sheet

0 Answers  


Hi. please provide license key for QTP 9.2, I have windows XP on my machine Thanks in Advance, moreshwar

0 Answers  


How to create configuration scripts

1 Answers  


How to see entire results at the same timeafter the batch run.. Cannot see the entire results at a time. Is there a easier way view everthing at same,as our batch file very large

2 Answers  


Write Descriptiv prg 4 login logn....txt bx password---txt bx ok---btn

2 Answers   Hewitt,






what ar the challenges do we face while testing webbased applications using the automation tool qtp or any?

4 Answers   TCS,


explain abt dyanamic changing object with example?

0 Answers   Wipro,


I have test cases in excel sheet but i am using quality center.How can i copy the testcases from excel sheet to quality center?explain this process.

3 Answers   TCS,


Which property do you use to retrieve or assign data into a cell in a Data Table object?

1 Answers  


difference between do while and do until ?

3 Answers   HCL,


hi is there any chance to change encoding the password

3 Answers  


How many actions we can create with in a test?

7 Answers  


Categories