Click here to Skip to main content
15,886,080 members
Home / Discussions / Database
   

Database

 
GeneralRe: Extracting just the date portion Pin
Colin Angus Mackay30-Mar-07 5:11
Colin Angus Mackay30-Mar-07 5:11 
AnswerRe: Extracting just the date portion Pin
kubben30-Mar-07 5:08
kubben30-Mar-07 5:08 
GeneralRe: Extracting just the date portion Pin
Marc Clifton30-Mar-07 5:14
mvaMarc Clifton30-Mar-07 5:14 
Questiongetting RecordCount = -1 Pin
Ankur.Bakliwal30-Mar-07 3:48
Ankur.Bakliwal30-Mar-07 3:48 
AnswerRe: getting RecordCount = -1 Pin
Christian Graus30-Mar-07 3:55
protectorChristian Graus30-Mar-07 3:55 
GeneralRe: getting RecordCount = -1 Pin
Ankur.Bakliwal30-Mar-07 3:59
Ankur.Bakliwal30-Mar-07 3:59 
GeneralRe: getting RecordCount = -1 Pin
Christian Graus30-Mar-07 4:03
protectorChristian Graus30-Mar-07 4:03 
AnswerRe: getting RecordCount = -1 Pin
roel_v31-Mar-07 2:45
roel_v31-Mar-07 2:45 
I found this on MSDN:

The cursor type of the Recordset object affects whether the number of records can be determined. The RecordCount property will return -1 for a forward-only cursor; the actual count for a static or keyset cursor; and either -1 or the actual count for a dynamic cursor, depending on the data source.

You are using CursorType = 3, which corresponds to a static cursor, so it should return. However, it also says:

The property returns -1 when ADO cannot determine the number of records or if the provider or cursor type does not support RecordCount.

What provider are you using?

In general, the safest solution is to just include a count(*) in your stored procedure and return that as an output parameter.

Let me know if this works for you.

Roel
QuestionDistribution of software Pin
drc_no130-Mar-07 3:41
drc_no130-Mar-07 3:41 
AnswerRe: Distribution of software Pin
Colin Angus Mackay30-Mar-07 4:32
Colin Angus Mackay30-Mar-07 4:32 
QuestionUrgent Pin
Test27030730-Mar-07 2:51
Test27030730-Mar-07 2:51 
AnswerRe: Urgent Pin
Christian Graus30-Mar-07 3:06
protectorChristian Graus30-Mar-07 3:06 
GeneralRe: Urgent Pin
Test27030730-Mar-07 3:44
Test27030730-Mar-07 3:44 
GeneralRe: Urgent Pin
Christian Graus30-Mar-07 4:00
protectorChristian Graus30-Mar-07 4:00 
GeneralRe: Urgent Pin
Test27030730-Mar-07 4:02
Test27030730-Mar-07 4:02 
GeneralRe: Urgent Pin
Christian Graus30-Mar-07 4:04
protectorChristian Graus30-Mar-07 4:04 
AnswerRe: Urgent Pin
Christian Graus30-Mar-07 4:04
protectorChristian Graus30-Mar-07 4:04 
AnswerRe: Urgent Pin
DQNOK30-Mar-07 4:09
professionalDQNOK30-Mar-07 4:09 
GeneralRe: Urgent Pin
Test27030730-Mar-07 18:40
Test27030730-Mar-07 18:40 
AnswerRe: Urgent Pin
Noman Aftab31-Mar-07 1:01
Noman Aftab31-Mar-07 1:01 
Questionserver : error 18025 Pin
Navneet Hegde30-Mar-07 2:47
Navneet Hegde30-Mar-07 2:47 
AnswerRe: server : error 18025 Pin
kubben30-Mar-07 3:45
kubben30-Mar-07 3:45 
GeneralRe: server : error 18025 Pin
Navneet Hegde30-Mar-07 3:47
Navneet Hegde30-Mar-07 3:47 
GeneralRe: server : error 18025 Pin
kubben30-Mar-07 3:54
kubben30-Mar-07 3:54 
GeneralRe: server : error 18025 Pin
kubben30-Mar-07 3:56
kubben30-Mar-07 3:56 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.