|
|
|||||||||
|
|||||||||
|
|||||||||
| |
||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
RecordCount on ADO recordset???
<i><b>Originally posted by : J. Feng (feng567@tfn.net)</b></i><br />Hi, All<br /><br />I created a ADO recordset through EDA midware on a DB2 database. The records in the recordset can be populated, but the RecordCount property of the recordset returns a -1 value.<br /><br />Is anyone here can help me on this problem?<br /><br />Thanks in advance!<br />
|
|
#2
|
|||
|
|||
|
Just check the cursor type . it has to be adOpenKeySet or adOpenStatic . Only then the recordcount property of the recordset will work.
One alternative method is as follows:- x = 0 do while rs.EOF = False Your asp code.... ..... ..... rs.MoveNext x = x + 1 Loop When the iteration is over the variable x will hold the number of records |
![]() |
| Viewing: ASP Free Forums > Database > SQL Development > RecordCount on ADO recordset??? |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|