Quality is delighting customers
The total number of columns of the database can be found using rs.fields.count..
in the same way..
1)Can anybody tell how to calculate the total number of rows in the database in QTP??
2)how to do the validation for the textfields for both valid and invalid in a single action??
3)How to find the items count in the listfield in a we based application..
i tried with getitemscount(),,but was not able to get..
Hope this might help u....
1> to count total no of rows in database use recordcount method.
2> use excel parameterization
3> getitemscount can be used for windows based application.For web based application u have to use items count property of List field.
Thanks & Regards,
We use the above syntax to get the rows present in an excel sheet. If we don't mention "GetSheet("Sheet Id")", It displays the no.of rows in the Global Sheet. So we need to mention from which sheet we need to count the rows.
For Ms access
set con = CreateObject("ADODB.Connection")
set rs =CreateObject("ADODB.recordset")
rs.open "select * from students", con
Msgbox rs.RecordCount [ to get the total number of records]
I've connected to SQL..n my application is .net application..its returning -1 value..so please let me know some other function..
Let's Take this the other way round. Navigate thru each an every records, set a counter and increment it till the last record. like
myrecordcount = 0
While not (ors.EOF)
myrecordcount = myrecordcount + 1
or if your are sure to have serial number in your table
then ors.MoveLast and extract the sr. no. column value ors.Fields("sr. no.").Value
Please elaborate Q2
For Q1:- use getroproperty("all items") and then using split function with delimiter ";" get an array and then Ubound(array) + 1 is your item count.