Click here to Skip to main content
15,898,222 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: multiple executables in the same project? Pin
Anthony_Yio17-Dec-03 16:03
Anthony_Yio17-Dec-03 16:03 
GeneralRe: multiple executables in the same project? Pin
luddet17-Dec-03 16:33
luddet17-Dec-03 16:33 
GeneralRe: multiple executables in the same project? Pin
Anthony_Yio17-Dec-03 17:17
Anthony_Yio17-Dec-03 17:17 
GeneralRe: multiple executables in the same project? Pin
luddet18-Dec-03 4:43
luddet18-Dec-03 4:43 
GeneralRe: multiple executables in the same project? Pin
John M. Drescher19-Dec-03 8:13
John M. Drescher19-Dec-03 8:13 
GeneralRe: multiple executables in the same project? Pin
luddet20-Dec-03 3:52
luddet20-Dec-03 3:52 
GeneralResource Only DLL question Urgent! Pin
Binayak17-Dec-03 11:24
Binayak17-Dec-03 11:24 
GeneralRe: Resource Only DLL question Urgent! Pin
Prakash Nadar17-Dec-03 16:42
Prakash Nadar17-Dec-03 16:42 
GeneralBest database classes for this purpose: not really a programming question Pin
pankajdaga17-Dec-03 11:21
pankajdaga17-Dec-03 11:21 
GeneralRe: Best database classes for this purpose: not really a programming question Pin
John M. Drescher17-Dec-03 17:09
John M. Drescher17-Dec-03 17:09 
Generalquick question Pin
Qbus17-Dec-03 10:41
Qbus17-Dec-03 10:41 
GeneralRe: quick question Pin
Terry O'Nolley17-Dec-03 12:34
Terry O'Nolley17-Dec-03 12:34 
GeneralRe: quick question Pin
sam India17-Dec-03 17:47
sam India17-Dec-03 17:47 
GeneralCRecordset, ODBC, and Access Pin
David Crow17-Dec-03 8:34
David Crow17-Dec-03 8:34 
I've a table in an Access database with an AutoNumber field. When I add a row to the table through a CRecordset object, I want to know the value of the AutoNumber field. I've read various articles on how this is done, but none of them work. The code basically looks like:

CMyRecordset set;
CDBVariant bookmark;
set.Open(AFX_DB_USE_DEFAULT_TYPE, NULL, CRecordset::useBookmarks);
set.AddNew();
set.field1 = 123;
set.field2 = 456;
...
set.GetBookmark(bookmark);
// the value of 'bookmark' at this point is invalid since the recordset has
not been updated
 
set.Update(); // this adds the new record, but also makes the first record
the current one
 
set.Requery();
set.SetBookmark(bookmark); // this has no effect
I successfully use bookmarks in other areas of the program when editing rows. I populate a listbox with each record in a recordset and assign the AutoNumber field using SetItemData(). When an item in the listbox is selected and the Edit button is clicked, I have the correct bookmark and can then use SetBookmark() and Edit() successfully. Using this scenario, if a newly added listbox item does not have a correct bookmark associated with it, SetBookmark() cannot be used prior to Edit() or Delete() calls. In other words, I have no way to navigate to the desired record.

Any ideas for this long-winded request?

Thanks,
DC


Five birds are sitting on a fence.
Three of them decide to fly off.
How many are left?

GeneralRe: CRecordset, ODBC, and Access Pin
Terry O'Nolley17-Dec-03 12:39
Terry O'Nolley17-Dec-03 12:39 
GeneralRe: CRecordset, ODBC, and Access Pin
David Crow18-Dec-03 2:51
David Crow18-Dec-03 2:51 
GeneralRe: CRecordset, ODBC, and Access Pin
Terry O'Nolley18-Dec-03 8:19
Terry O'Nolley18-Dec-03 8:19 
GeneralRe: CRecordset, ODBC, and Access Pin
sam India17-Dec-03 18:21
sam India17-Dec-03 18:21 
GeneralRe: CRecordset, ODBC, and Access Pin
David Crow18-Dec-03 2:40
David Crow18-Dec-03 2:40 
GeneralOWL to MFC Pin
olezhik17-Dec-03 8:16
olezhik17-Dec-03 8:16 
GeneralRe: OWL to MFC Pin
Jörgen Sigvardsson17-Dec-03 8:24
Jörgen Sigvardsson17-Dec-03 8:24 
GeneralRe: OWL to MFC Pin
Terry O'Nolley17-Dec-03 12:40
Terry O'Nolley17-Dec-03 12:40 
GeneralRe: OWL to MFC Pin
Anthony_Yio17-Dec-03 15:56
Anthony_Yio17-Dec-03 15:56 
GeneralRe: OWL to MFC Pin
Joe Woodbury18-Dec-03 5:31
professionalJoe Woodbury18-Dec-03 5:31 
GeneralHardware Interfacing Pin
Member 17799617-Dec-03 7:05
Member 17799617-Dec-03 7:05 

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.