Click here to Skip to main content
15,914,074 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: problem with including headers Pin
Ravi Bhavnani18-Jul-04 13:28
professionalRavi Bhavnani18-Jul-04 13:28 
GeneralDetermining DPI Pin
JD Steffen18-Jul-04 11:41
JD Steffen18-Jul-04 11:41 
GeneralRe: Determining DPI Pin
Michael Dunn18-Jul-04 12:52
sitebuilderMichael Dunn18-Jul-04 12:52 
GeneralRe: Determining DPI Pin
JD Steffen19-Jul-04 23:50
JD Steffen19-Jul-04 23:50 
GeneralCRecordSet->MoveFirst() exception Pin
JabraJabra18-Jul-04 7:12
JabraJabra18-Jul-04 7:12 
GeneralRe: CRecordSet->MoveFirst() exception Pin
Toni7818-Jul-04 7:15
Toni7818-Jul-04 7:15 
GeneralRe: CRecordSet->MoveFirst() exception Pin
Scozturk18-Jul-04 7:23
professionalScozturk18-Jul-04 7:23 
GeneralRe: CRecordSet->MoveFirst() exception Pin
Alexander Wiseman18-Jul-04 9:05
Alexander Wiseman18-Jul-04 9:05 
Hi,

You also might want to check how you're opening the recordset. The recordset must not be opened as forwardOnly, otherwise it will be a read-only recordset which can only move in one direction, so it would not support calls like MoveFirst().

The other problem might be that, if your recordset is previously empty, and then you call AddNew() but fail to call Update(), then your recordset will still be empty and MoveFirst() will fail. MSDN states that you must call Update() after calling AddNew(), otheriwse no changes will be made and no warning will be given. Thus, if your recordset is empty, the exception will be thrown on the MoveFirst() call.

So two things:
1) Make sure the recordset is not opened with type forwardOnly
2) Make sure you are calling CRecordset::Update() AFTER you call AddNew(), otherwise no record will actually be added.

Hope that helps.

Sincerely,
Alexander Wiseman

Est melior esse quam videri
It is better to be than to seem
GeneralLOGPEN Pin
Trollslayer18-Jul-04 6:47
mentorTrollslayer18-Jul-04 6:47 
GeneralRe: LOGPEN Pin
Trollslayer18-Jul-04 8:37
mentorTrollslayer18-Jul-04 8:37 
GeneralRe: LOGPEN Pin
Alexander Wiseman18-Jul-04 9:06
Alexander Wiseman18-Jul-04 9:06 
GeneralRe: LOGPEN - resource usage warning Pin
PJ Arends18-Jul-04 9:06
professionalPJ Arends18-Jul-04 9:06 
GeneralRe: LOGPEN Pin
Alexander Wiseman18-Jul-04 8:56
Alexander Wiseman18-Jul-04 8:56 
GeneralGet a pointer from an RVA Pin
Toni7818-Jul-04 6:43
Toni7818-Jul-04 6:43 
GeneralRe: Get a pointer from an RVA Pin
bikram singh19-Jul-04 12:55
bikram singh19-Jul-04 12:55 
GeneralProblem Creating a server on the local PC using CAsyncSocket Pin
femi ashiru18-Jul-04 6:42
femi ashiru18-Jul-04 6:42 
GeneralRe: Problem Creating a server on the local PC using CAsyncSocket Pin
valikac18-Jul-04 13:59
valikac18-Jul-04 13:59 
GeneralDirectory Date/Time Pin
Atlence18-Jul-04 4:04
Atlence18-Jul-04 4:04 
GeneralRe: Directory Date/Time Pin
Toni7818-Jul-04 7:32
Toni7818-Jul-04 7:32 
GeneralRe: Directory Date/Time Pin
Atlence18-Jul-04 14:19
Atlence18-Jul-04 14:19 
GeneralRe: Directory Date/Time Pin
Atlence2-Apr-05 12:55
Atlence2-Apr-05 12:55 
GeneralRe: Directory Date/Time Pin
Toni7829-Apr-05 13:30
Toni7829-Apr-05 13:30 
GeneralRe: Directory Date/Time Pin
Toni789-May-05 6:42
Toni789-May-05 6:42 
GeneralDialog Problem Pin
Kunal Shetye18-Jul-04 2:44
Kunal Shetye18-Jul-04 2:44 
GeneralRe: Dialog Problem Pin
Alexander Wiseman18-Jul-04 3:22
Alexander Wiseman18-Jul-04 3:22 

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.