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

Answer Posted / 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



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Please provide specific examples of advanced/creative usage of QTP, including how impact & benefits for your project

1644


What is the difference between local and shared object repository in qtp?

569


write a script for allinterview-submit Question first we've to select Choose Category,second select Sub- Category(Which is comes in to runtime)third select Question Type.for that give some descriptive and vb script

1365


If you giving priority as p0, as a developer if I give priority as p2, What happens In user defined function ?

595


How to remove associated function library?

566






What is ObjectParamater?

1575


Hi,Sudhanandareddy plz forword framework and ppts for QTP to me. This is my mail id: ranjith_99reddy@yahoo.co.in (your contact number also)

1745


What are the types of properties that quick test learns while recording?

540


Which advantages helping QTP to hold the position of "Market Leader" for such a long period?

1391


what is the difference between the modular framework and datadriven frame work

1922


Name the different types of recording modes?

582


hi guys, pls tell me for testing institution training hub, hitech city is best or not?

1325


On what document base Descriptive programming is written if build is not yet ready ?

882


how to use the QTP choose the data from oracle? e.g. i input the identity card NO. this will be add new record in the database ,and now i want get this record's prime key.

1328


I want two test two agents login for the flight website. Here is the scenario: I want to go through 1-3 rows for one user login and other user login I want to go though 3-5 rows. How would you set this up in qtp. Thank You

1525