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
Answer / ram
you use following sql query
select column name, count(column name)from table name.
Is This Answer Correct ? | 3 Yes | 3 No |
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 |
Answer / mahesh
select count(column name) column name from the table.
Is This Answer Correct ? | 1 Yes | 2 No |
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 |
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 |
How can we use XML in QTP?
In QTP I have a parameter in a datatable that is a sentence. I need to take the last word from the sentence and enter it into a field in a web application. How can I setup a parameter to enter in just a portion of the parameter (last word of the sentence) instead of the entire paramater (whole sentence).
Explain Different types of Checkpoints in Quick Test Professional?
How Does Run time data (Parameterization) is handled in QTP?
How to modify object property in qtp ?
When u ll use Record Button in QTP?Is VB script is Mandatory in QTP? What is Meaning of Frame("v1")?
What is an environment variable?
Through array we can execute the testcase how ? give me example
Can we access the java methods in qtp. Because my requirement is to access the swt(for eclipse an it is java code) methods in qtp is it possible?
How does QTP identifes the object in the application?
What are the ordinal identifiers in web page?
What is Modular framework and Keyword drive framework? Explain