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

C / C++ / MFC

 
QuestionChanging paper size - how??? Pin
Anonymous5-Feb-04 23:32
Anonymous5-Feb-04 23:32 
AnswerSorry about double post Pin
Anonymous5-Feb-04 23:36
Anonymous5-Feb-04 23:36 
AnswerRe: Changing paper size - how??? Pin
CodeBrain6-Feb-04 0:33
CodeBrain6-Feb-04 0:33 
GeneralRe: Changing paper size - how??? Pin
Anonymous7-Mar-04 21:48
Anonymous7-Mar-04 21:48 
GeneralChanging paper size Pin
Anonymous5-Feb-04 23:32
Anonymous5-Feb-04 23:32 
GeneralRe: Changing paper size Pin
Robert A. T. Káldy7-Feb-04 21:58
Robert A. T. Káldy7-Feb-04 21:58 
GeneralRe: Changing paper size Pin
Anonymous7-Mar-04 21:42
Anonymous7-Mar-04 21:42 
QuestionRecordset requery and movelast problem? Pin
d01530305-Feb-04 23:24
sussd01530305-Feb-04 23:24 
Hi i am adding to the ms -access database through the MFC code
CRecordset. Prior to adding the record last designID was 74

<br />
     CRSDesign dRS(pdb);<br />
     <br />
      if(!dRS.Open ())<br />
 return FALSE;<br />
      if (!dRS.CanAppend ())<br />
 return FALSE;<br />
     <br />
       dRS.AddNew();<br />
       dRS.m_DesignName  = DesignName;<br />
       dRS.m_DesignType  = DesignType;<br />
       dRS.m_Remarks = Comments;<br />
       dRS.m_D_Designer  = Designer;<br />
       dRS.Update();<br />
    <br />
       dRS.Requery ();<br />
       dRS.MoveLast ();<br />
       long DesignID = dRS.m_DesignID ;<br />
       AfxMessageBox(_ltoa(DesignID,cc,10));   ---> 74<br />


Message box also gives design id as 74. How to overcome this.?


Well
Select @@IDENTITY as num FROM B_DESIGN

query with MS- Access Database does returns just
0
0
0
0
0 For the number of record i am having in my table

Main Problem
DesignID is autonumber field in my data base and is primary key
It is having following values:
12
15
23
70
71
73
74
112

Now when i am running following query into data base (MS-Access query)

SELECT Last(DesignID) FROM B_Design
it returns 74

Even i put a loop after requery and getting designID in message box it starts from 112,5,12,15 .......

When i move recordset to MoveFirst() it will give designID - 112
and when MoveLast() then it will give 74


Have any body idea about this?
How to resolve this problem?
If any more clarification is required please ask for that?
AnswerRe: Recordset requery and movelast problem? Pin
David Crow6-Feb-04 4:06
David Crow6-Feb-04 4:06 
GeneralOverloading operator new Pin
RichardS5-Feb-04 23:04
RichardS5-Feb-04 23:04 
GeneralRe: Overloading operator new Pin
фил6-Feb-04 1:24
фил6-Feb-04 1:24 
GeneralRe: Overloading operator new Pin
Tim Smith6-Feb-04 4:20
Tim Smith6-Feb-04 4:20 
GeneralRe: Overloading operator new Pin
Tim Smith6-Feb-04 4:17
Tim Smith6-Feb-04 4:17 
GeneralGraphics in Visual C++ Pin
chadell5-Feb-04 23:01
chadell5-Feb-04 23:01 
GeneralRetriving User Login Logoff time from Domain Server Pin
bilal785-Feb-04 22:46
bilal785-Feb-04 22:46 
GeneralDo You Like C/C++ Pin
Anonymous5-Feb-04 22:43
Anonymous5-Feb-04 22:43 
GeneralRe: Do You Like C/C++ Pin
Taka Muraoka6-Feb-04 1:14
Taka Muraoka6-Feb-04 1:14 
GeneralRe: Do You Like C/C++ Pin
AORD7-Feb-04 17:11
AORD7-Feb-04 17:11 
Questionhow can i develop a parser which is like .......? Pin
cyberiafreak5-Feb-04 22:40
cyberiafreak5-Feb-04 22:40 
AnswerRe: how can i develop a parser which is like .......? Pin
Jim Crafton6-Feb-04 4:43
Jim Crafton6-Feb-04 4:43 
GeneralContext Menu Handlers - Problems with M. Dunns Examples Pin
Sebastian Schneider5-Feb-04 22:31
Sebastian Schneider5-Feb-04 22:31 
Generalmemory leak problem Pin
zhangxinghai5-Feb-04 22:02
zhangxinghai5-Feb-04 22:02 
GeneralRe: memory leak problem Pin
Robert A. T. Káldy7-Feb-04 22:08
Robert A. T. Káldy7-Feb-04 22:08 
GeneralChange Font Size Pin
Best Friend5-Feb-04 21:26
Best Friend5-Feb-04 21:26 
GeneralRe: Change Font Size Pin
Selvam R5-Feb-04 22:48
professionalSelvam R5-Feb-04 22:48 

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.