Click here to Skip to main content
15,881,715 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Why I cannot have a ListControl in a CRecordView derived class? Pin
David Crow4-Dec-09 7:48
David Crow4-Dec-09 7:48 
GeneralRe: Why I cannot have a ListControl in a CRecordView derived class? Pin
Larry Mills Sr4-Dec-09 8:02
Larry Mills Sr4-Dec-09 8:02 
GeneralRe: Why I cannot have a ListControl in a CRecordView derived class? Pin
David Crow4-Dec-09 9:06
David Crow4-Dec-09 9:06 
GeneralRe: Why I cannot have a ListControl in a CRecordView derived class? Pin
Larry Mills Sr4-Dec-09 13:52
Larry Mills Sr4-Dec-09 13:52 
GeneralRe: Why I cannot have a ListControl in a CRecordView derived class? Pin
David Crow7-Dec-09 2:59
David Crow7-Dec-09 2:59 
GeneralRe: Why I cannot have a ListControl in a CRecordView derived class? Pin
Larry Mills Sr7-Dec-09 5:13
Larry Mills Sr7-Dec-09 5:13 
QuestionRe: Why I cannot have a ListControl in a CRecordView derived class? Pin
David Crow7-Dec-09 5:27
David Crow7-Dec-09 5:27 
AnswerRe: Why I cannot have a ListControl in a CRecordView derived class? Pin
Larry Mills Sr7-Dec-09 5:35
Larry Mills Sr7-Dec-09 5:35 
Here's the code:

CString CMyDB::GetDefaultConnect()
{
     return _T("DBQ=C:\\CookIt\\Program\\DataBases\\DB\\CookIt.mdb;DefaultDir=C:\\CookIt\\Program\\DataBases\\DB;Driver={Driver do Microsoft Access (*.mdb)};DriverId=25;FIL=MS Access;FILEDSN=C:\\CookIt\\Program\\DataBases\\DB\\CookIt.mdb.dsn;MaxBufferSize=2048;MaxScanRows=8;PageTimeout=5;SafeTransactions=0;Threads=3;UID=admin;UserCommitSync=Yes;");
}

CString CMyDB::GetDefaultSQL()
{
     return _T("[ApeData],[BreadData],[CakeData],[CandyData],[CookieData],[DrinkData],[FruitData],[MeatData],[PastryData],[PieData],[PudData],[Recipe],[SaladData],[SauceData],[SelRecipe],[SoupData],[Special2Pg1],[Special2Pg2],[Special2Pg3],[Special2Pg4],[Special2Pg5],[Special2Pg7],[SpecialPg1],[SpecialPg2],[SpecialPg3],[SpecialPg4],[SpecialPg5],[SpecialPg6],[SpecialPg7],[VegData]");
}

Here's some more code:


void CCookItDBView::OnInitialUpdate()
     {
     m_pSet = &GetDocument()->m_CookItDBSet;

     m_pSet->Open(CRecordset::dynaset,0,CRecordset::none );     
     BOOL B = m_pSet->CanAppend();
     BOOL e = m_pSet->CanUpdate();
            }

Yes I am using DSN and no I don't use a CDatabase object(because I don't know how)

I don't know whaqt to put in the Cdatabase.Open(...,...,...) statement.
I checked carefully when I did the "add class" and OBDC dialog and the "Read Only" box was left unselected as was the "Execute" box

A C++ programming language novice, but striving to learn

GeneralRe: Why I cannot have a ListControl in a CRecordView derived class? Pin
David Crow7-Dec-09 8:49
David Crow7-Dec-09 8:49 
GeneralRe: Why I cannot have a ListControl in a CRecordView derived class? Pin
Larry Mills Sr7-Dec-09 13:30
Larry Mills Sr7-Dec-09 13:30 
GeneralRe: Why I cannot have a ListControl in a CRecordView derived class? Pin
David Crow8-Dec-09 3:24
David Crow8-Dec-09 3:24 
GeneralRe: Why I cannot have a ListControl in a CRecordView derived class? [modified] Pin
Larry Mills Sr7-Dec-09 14:05
Larry Mills Sr7-Dec-09 14:05 
QuestionRe: Why I cannot have a ListControl in a CRecordView derived class? Pin
David Crow8-Dec-09 3:20
David Crow8-Dec-09 3:20 
AnswerRe: Why I cannot have a ListControl in a CRecordView derived class? Pin
Larry Mills Sr8-Dec-09 4:12
Larry Mills Sr8-Dec-09 4:12 
GeneralRe: Why I cannot have a ListControl in a CRecordView derived class? Pin
Larry Mills Sr9-Dec-09 4:25
Larry Mills Sr9-Dec-09 4:25 
AnswerRe: Why I cannot have a ListControl in a CRecordView derived class? Pin
David Crow9-Dec-09 4:29
David Crow9-Dec-09 4:29 
GeneralRe: Why I cannot have a ListControl in a CRecordView derived class? Pin
Larry Mills Sr9-Dec-09 4:47
Larry Mills Sr9-Dec-09 4:47 
QuestionMessage mapping Pin
msr_codeproject29-Nov-09 6:56
msr_codeproject29-Nov-09 6:56 
AnswerRe: Message mapping Pin
«_Superman_»29-Nov-09 8:15
professional«_Superman_»29-Nov-09 8:15 
AnswerRe: Message mapping Pin
Rajesh R Subramanian29-Nov-09 8:18
professionalRajesh R Subramanian29-Nov-09 8:18 
QuestionDev C++ cant accept vector?? Pin
nuttynibbles29-Nov-09 5:10
nuttynibbles29-Nov-09 5:10 
AnswerRe: Dev C++ cant accept vector?? Pin
Rajesh R Subramanian29-Nov-09 5:19
professionalRajesh R Subramanian29-Nov-09 5:19 
GeneralRe: Dev C++ cant accept vector?? [modified] Pin
nuttynibbles29-Nov-09 6:40
nuttynibbles29-Nov-09 6:40 
GeneralRe: Dev C++ cant accept vector?? Pin
Rajesh R Subramanian29-Nov-09 6:54
professionalRajesh R Subramanian29-Nov-09 6:54 
GeneralRe: Dev C++ cant accept vector?? Pin
nuttynibbles29-Nov-09 6:57
nuttynibbles29-Nov-09 6:57 

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.