How i know the size of "resultset"?

  • Thread starter Thread starter Matrix
  • Start date Start date
M

Matrix

How i know the size of "resultset"?

OleDbCommand cmdPerson = new OleDbCommand("{call
PackPerson_JamesTest.allPerson_JamesTest({resultset 4, ssn, fname,
lname})}", cnOra);
 
resultset 4 ,
but i don't know how much the records are! how do i set this resultset
value?
 
It depends. If you are using a DataTable, or dataset, you can reference the
Rows.Count property of the datatable. Either
myDataSet.Tables(MyDataTable).Rows.Count or myDatatable.Rows.Count

If you are using a datareader, you'll need to walk through it. If you are
using the 1.1 framework, you can use DataReader.HasRows to determine if you
have rows or not, but you'll need to walk trhough it to determine the count

while(rdr.Read()){ i++;}
 
call PackPerson_JamesTest.allPerson_JamesTest({resultset 4, ssn,
fname,lname})

this line code is the way it get Records from database though package of
oracle.
i don't know resultset size,so how do i run this oracle's package and get
myDataTable?
 
Matrix:

Haven't tried it with packages and ADO.NET , but I'd set that as my
commandtext and if it returns an integer value use something like int i =
mycommand.ExecuteScalar();
 
thanks a lot
but My program is about ASP.net, i decide to use package in order to improve
the performance.
 
Back
Top