Click here to Skip to main content
15,902,635 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionTimers in Worker threads? Pin
ramdili23-May-02 20:48
ramdili23-May-02 20:48 
AnswerRe: Timers in Worker threads? Pin
Sameer Maggon23-May-02 21:04
Sameer Maggon23-May-02 21:04 
GeneralActiveX ATL - Problem - ASP Pin
Sameer Maggon23-May-02 20:45
Sameer Maggon23-May-02 20:45 
GeneralOwnerdraw Pin
Jan van den Baard23-May-02 20:39
professionalJan van den Baard23-May-02 20:39 
Generala painful "select database" dialog... Pin
Atilla Selem23-May-02 20:34
Atilla Selem23-May-02 20:34 
GeneralRe: a painful "select database" dialog... Pin
Prem Kumar23-May-02 20:38
Prem Kumar23-May-02 20:38 
GeneralRe: a painful "select database" dialog... Pin
Atilla Selem23-May-02 21:23
Atilla Selem23-May-02 21:23 
GeneralRe: a painful "select database" dialog... Pin
Matt Gullett24-May-02 0:38
Matt Gullett24-May-02 0:38 
When you construct the CRecordset, you need to pass in a pointer to your CDatabase object.

It appears that you are istantiating the CRecordset object before you connect to the database. Try moving the istantiation of your CRecordset below the CDatabase::open call and be sure to pass in a pointer to the CDatabase object through the constructor.

CDatabase db

db.Open("somedsn", someoptions);

CRecordset rs(&db);

rs.Open();

//.. do your code here ..

rs.close();


db.Close();


I ommited error checking code for simplicity.
GeneralACCESS_MASK Pin
Mazdak23-May-02 20:14
Mazdak23-May-02 20:14 
GeneralRe: ACCESS_MASK Pin
PJ Arends23-May-02 20:21
professionalPJ Arends23-May-02 20:21 
GeneralRe: ACCESS_MASK Pin
Mazdak23-May-02 20:48
Mazdak23-May-02 20:48 
GeneralViews derived from CWnd Pin
Mangesh Sardesai23-May-02 19:52
Mangesh Sardesai23-May-02 19:52 
GeneralRe: Views derived from CWnd Pin
Joaquín M López Muñoz23-May-02 19:56
Joaquín M López Muñoz23-May-02 19:56 
GeneralRe: Views derived from CWnd Pin
Nish Nishant23-May-02 20:42
sitebuilderNish Nishant23-May-02 20:42 
GeneralCreateThread Vs CreateProcess Pin
23-May-02 19:50
suss23-May-02 19:50 
GeneralRe: CreateThread Vs CreateProcess Pin
Joaquín M López Muñoz23-May-02 19:53
Joaquín M López Muñoz23-May-02 19:53 
GeneralActiveX ATL Pin
Sameer Maggon23-May-02 19:07
Sameer Maggon23-May-02 19:07 
GeneralRe: ActiveX ATL Pin
Paul M Watt23-May-02 19:50
mentorPaul M Watt23-May-02 19:50 
GeneralRe: ActiveX ATL Pin
Sameer Maggon23-May-02 20:43
Sameer Maggon23-May-02 20:43 
GeneralRe: ActiveX ATL Pin
Paul M Watt23-May-02 21:14
mentorPaul M Watt23-May-02 21:14 
GeneralRe: ActiveX ATL Pin
Sameer Maggon23-May-02 21:18
Sameer Maggon23-May-02 21:18 
GeneralPrinting from multiple views Pin
slackboy23-May-02 18:30
slackboy23-May-02 18:30 
GeneralRe: Printing from multiple views Pin
Jonathan Craig24-May-02 3:31
Jonathan Craig24-May-02 3:31 
GeneralRe: Printing from multiple views Pin
slackboy25-May-02 19:50
slackboy25-May-02 19:50 
QuestionHow to add a shortcut to the toolbar of IE? Pin
George Ma23-May-02 16:44
George Ma23-May-02 16:44 

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.