Number of records 
Author Message
 Number of records
Hi,

I have a script that collect data from our AS/400 and put them into a
recordset with this command:

Set rsSource = cnMovex.Execute("SELECT * FROM EKALKSRC_1")

How can I find the number of records from this connection ?  I've tried to
retrieve this with rsSource.RecordCount with no luck.

Thanks in advance



Sat, 17 Apr 2004 22:17:42 GMT
 Number of records

I've heard you have to do a movelast before you can get an
accurate record count

rssource.movelast
nRecords = rssource.recordcount

I haven't tried it myself though.
htt

Quote:
>-----Original Message-----
>Hi,

>I have a script that collect data from our AS/400 and put
them into a
>recordset with this command:

>Set rsSource = cnMovex.Execute("SELECT * FROM EKALKSRC_1")

>How can I find the number of records from this

connection ?  I've tried to
Quote:
>retrieve this with rsSource.RecordCount with no luck.

>Thanks in advance

>.



Sat, 17 Apr 2004 23:35:04 GMT
 Number of records
If the cursorlocation has been set to Client side, "MoveLast" can be
ignored.


Sun, 18 Apr 2004 13:16:23 GMT
 Number of records
And if that doesn't work, make sure you have the right CursorType.

Peter Bradshaw


Quote:

> I've heard you have to do a movelast before you can get an
> accurate record count

> rssource.movelast
> nRecords = rssource.recordcount

> I haven't tried it myself though.
> htt

> >-----Original Message-----
> >Hi,

> >I have a script that collect data from our AS/400 and put
> them into a
> >recordset with this command:

> >Set rsSource = cnMovex.Execute("SELECT * FROM EKALKSRC_1")

> >How can I find the number of records from this
> connection ?  I've tried to
> >retrieve this with rsSource.RecordCount with no luck.

> >Thanks in advance

> >.



Sun, 18 Apr 2004 11:39:08 GMT
 Number of records
RecordCount is valid only for certain combinations of cursor location and
cursor type; try adding the following line before your cn.execute method
call:

rsSource.CursorLocation = adUseClient

Then you should receive an accurate recordcount (ie not -1).

Steven Bras, MCSD
Microsoft Developer Support/Visual Basic WebData

This posting is provided "AS IS" with no warranties, and confers no rights.
You assume all risk for your use. ? 2001 Microsoft Corporation. All rights
reserved.



Mon, 19 Apr 2004 03:26:05 GMT
 
 [ 5 post ] 

 Relevant Pages 

1. Find certain Number of Records / Print only certain number of records

2. HELP: Selecting a Specific number of Records from Record Set

3. HELP: Selecting a Specific number of Records from Record Set

4. Determine number of record and record size

5. Get number of records in a subform

6. numbering my records based on a grouping

7. ODBC problem in fetching large number of records.

8. Getting number of record added

9. deleting only X number of records...

10. Limiting the number of records in SELECT

11. INSERT large number of records

12. A query to get the user table which has maximum number of records


 
Powered by phpBB® Forum Software