Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
L

Larry Mills Sr

@Larry Mills Sr
About
Posts
266
Topics
87
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • Port 7078 and 7077 blocked in Vista
    L Larry Mills Sr

    I am trying to install a "WebDisk" from my website host and I get the following error message from Internet Explorer "The web folder is not available. Please insure that the port is not firewalled."   The port IS NOT firewalled yet I continue to get this error message. I tried to manually create the web disk folder and I get the same thing. Without the web disk folder I cannot upload files for my website. Any suggestions?

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

    C / C++ / MFC c++ help question

  • No Idea why the linker is giving error
    L Larry Mills Sr

    Thanks

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

    C / C++ / MFC c++ csharp visual-studio debugging help

  • No Idea why the linker is giving error
    L Larry Mills Sr

    Yes, I know that, but how would I do that with a CDocument and a CPropertyPage?

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

    C / C++ / MFC c++ csharp visual-studio debugging help

  • No Idea why the linker is giving error
    L Larry Mills Sr

    I thought by my putting the #include CCookItDBDoc.h in the prpopertyPage header that I would be able to jump to a function(Non-static) within the CCookItDBDoc class. I   guess you can't do it that way. How would you do it?

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

    C / C++ / MFC c++ csharp visual-studio debugging help

  • No Idea why the linker is giving error
    L Larry Mills Sr

    In my PropertyPage header I have this declaration: #include "CookItDBDoc.h" // CSpecial2Page1 dialog class CSpecial2Page1 : public CBCGPPropertyPage {      DECLARE_DYNAMIC(CSpecial2Page1) public:      CSpecial2Page1();      //CWnd* pParent = NULL, int nDlg = 0, CString csDlgName = "");   // standard constructor      virtual ~CSpecial2Page1();      void RetFromGetSpecialMealDlg(CString csFileName); // Attributes public:      CCookItDBDoc* GetDocument() const; ... } ============> in .cpp file <======================== void CSpecial2Page1::RetFromGetSpecialMealDlg(CString csFileName)      {      m_csFileName = csFileName;      FileReadCatMenuXML(m_csFileName);      FileReadSpecialMenuXML(m_cMenuData.m_csFullFilePath);      CSpecial2* pPS = (CSpecial2*)GetParent();      pPS->SetSpecial(m_cSpecialData);      pPS->SetMenuData(m_cMenuData);      SetDlgItemText(IDC_SELDRINKS,m_cSpecialData.m_csSpecialOccassionName);      FileReadDrinkMenuXML(m_cSpecialData.m_csDrinkFilePath);      InsertItemsDrink();      GetDocument()->OnNewSpecialDrink(m_vDrink, m_cSpecialData.m_csSpecialOccassionName);      } the error is this: 1>Linking... 1>Special2Page1.obj : error LNK2019: unresolved external symbol "public: class CCookItDBDoc * __thiscall CSpecial2Page1::GetDocument(void)const " (?GetDocument@CSpecial2Page1@@QBEPAVCCookItDBDoc@@XZ) referenced in function "public: void __thiscall CSpecial2Page1::RetFromGetSpecialMealDlg(class ATL::CStringT<char,class StrTraitMFC<char,class ATL::ChTraitsCRT<char> > >)" (?RetFromGetSpecialMealDlg@CSpecial2Page1@@QAEXV?$CStringT@DV?$StrTraitMFC@DV?$ChTraitsCRT@D@ATL@@@@@ATL@@@Z) 1>C:\Users\Larry A Mills Sr\Documents\Visual Studio 2008\Projects\CookItDB\Debug\CookItDB.exe : fatal error LNK1120: 1 unresolved externals 1>Build log was saved at "file://c:\Users\Larry A Mills Sr\Documents\Visual Studio 2008\Projects\CookItDB\CookItDB\Debug\BuildLog.htm" 1>CookItDB - 2 error(s), 0 warning(s) I thought maybe I had mispelled something so I checked: in Doc header:      void OnNewSpecialDrink(CDrinkDataVec vData,

    C / C++ / MFC c++ csharp visual-studio debugging help

  • In MFC using a MS Access Database will NOT allow more Tahn 255 Chars even with setting RFX_Text to 1024 length
    L Larry Mills Sr

    But doesn't all the data fields(columns) have to be in binary? Could you please send me an example of how to do that.

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

    C / C++ / MFC c++ database com tutorial question

  • In MFC using a MS Access Database will NOT allow more Tahn 255 Chars even with setting RFX_Text to 1024 length
    L Larry Mills Sr

    Yess, David,   it is still 255. My field is set to Memo rather than text. but still it is NOT accepted by the Access DB; though eactly 918 chars was there before the Update() was called. long nMaxLength = 1024;      RFX_Text(pFX, _T("[Instructions]"), m_Instructions,nMaxLength);// 918 chars loaded Less than 255 loaded into DB!!! I have no idea why this is happening. David A question nfor you personally: Was you ever able to setup the Edit() and Delete() functions in your program you sent me?   Let me know if/when you have this. Thanks.

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

    C / C++ / MFC c++ database com tutorial question

  • In MFC using a MS Access Database will NOT allow more Tahn 255 Chars even with setting RFX_Text to 1024 length
    L Larry Mills Sr

    For code please see the below (Previous Post" (Previous post): <a href="http://www.codeproject.com/Messages/3303272/Re-Using-RFX\_Text\_Bulk.aspx">http://www.codeproject.com/Messages/3303272/Re-Using-RFX\_Text\_Bulk.aspx</a>[<a href="http://www.codeproject.com/Messages/3303272/Re-Using-RFX\_Text\_Bulk.aspx" target="_blank" title="New Window">^</a>] I cannot get the MS Access Database to accept over 1000 chars into a column using the RFX_Text that is set to   1024 length (See Previous Post CMyDB.cpp RXF listing). Does anyone know how to do this in MFC?

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

    C / C++ / MFC c++ database com tutorial question

  • Using RFX_Text_Bulk
    L Larry Mills Sr

    Because of the prior code listing I'll post all the code here. How I write to the DB void CCookItDBDoc::OnRecordNew(CRecipeData cData, int nIndex)      {      m_cRecipeData.CleanUp();      m_cRecipeData = cData;      //CheckStrSize();      //m_CookItDBSet.CleanUp();      TRY           {           if (m_CookItDBSet.Open(CRecordset::dynaset, NULL, CRecordset::appendOnly))                {                m_CookItDBSet.AddNew();                if(nIndex == 0)                     {                     m_CookItDBSet.m_ID = 1;                     }                //nRecord = m_CookItDBSet.m_ID;                //m_CookItDBSet.CleanUp();                m_CookItDBSet.m_Category = m_cRecipeData.m_csCategory;                m_CookItDBSet.m_RecipeName = m_cRecipeData.m_csRecipeName;                m_CookItDBSet.m_RecipeType = m_cRecipeData.m_csRecipeType;                m_CookItDBSet.m_FullFilePath = m_cRecipeData.m_csFullFilePath;                m_CookItDBSet.m_Ingred1 = m_cRecipeData.m_csIngred1;                m_CookItDBSet.m_Amt1 = m_cRecipeData.m_csAmt1;                m_CookItDBSet.m_Unit1 = m_cRecipeData.m_csUnit1;                m_CookItDBSet.m_Ingred2 = m_cRecipeData.m_csIngred2;                m_CookItDBSet.m_Amt2 = m_cRecipeData

    C / C++ / MFC tutorial c++ help workspace

  • Using RFX_Text_Bulk
    L Larry Mills Sr

    I tried that, and while it gave me no errors; it also DID NOT put all the data from m_Instructions into the database (It has the data in the varable before calling Update();)

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

    C / C++ / MFC tutorial c++ help workspace

  • Using RFX_Text_Bulk
    L Larry Mills Sr

    Perhaps it would help if I enclosed my Recordset: Recordset header(part):      LONG_PTR prgLengths;      int nMaxLength;      int nRows;                     // set this to the number of rows in the data      long     m_ID;      CString     m_Category;      CString     m_RecipeName;      CString     m_RecipeType;      CString     m_FullFilePath;      CString     m_Ingred1;      CString     m_Amt1;      CString     m_Unit1;      CString     m_Ingred2;      CString     m_Amt2;      CString     m_Unit2;      CString     m_Ingred3;      CString     m_Amt3;      CString     m_Unit3;      CString     m_Ingred4;      CString     m_Amt4;      CString     m_Unit4;      CString     m_Ingred5;      CString     m_Amt5;      CString     m_Unit5;      CString     m_Ingred6;      CString     m_Amt6;      CString     m_Unit6;      CString     m_Ingred7;      CString     m_Amt7;      CString     m_Unit7;      CString     m_Ingred8;      CString     m_Amt8;      CString     m_Unit8;      CString     m_Ingred9;      CString     m_Amt9;      CString     m_Unit9;      CString   &nb

    C / C++ / MFC tutorial c++ help workspace

  • Using RFX_Text_Bulk
    L Larry Mills Sr

    Please excuse my ignorance: This particular record only has one column data that requires at least 1024 chars so how do I set that colum up to receive and return 1024 chars (if that is the amount inputed? the column's varable is "m_Instructions", which is the "Preparation Instructions for a recipe. please use this data in your explaination: Note there are 58 varables in this record. pszName = "Instructions";//Column header prgStrVals = "m_Instructions"// varable prgLengths = ???//don't know nMaxLength = 1024; RFX_Text_Bulk(fieldX, pszName, &prgStrVals, &prgLengths, nMaxLength);

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

    modified on Sunday, December 13, 2009 10:41 AM

    C / C++ / MFC tutorial c++ help workspace

  • Using RFX_Text_Bulk
    L Larry Mills Sr

    Sorry, that doesn't work.   I thought the same thing. they want something for "prgLengths" but I don't know what. I've tried many examples shown through out the internet, but the errors remain.

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

    C / C++ / MFC tutorial c++ help workspace

  • Using RFX_Text_Bulk
    L Larry Mills Sr

    void RFX_Text_Bulk(    CFieldExchange* pFX,    LPCTSTR szName,    LPSTR* prgStrVals,    long** prgLengths,// show how to setup and implement    int nMaxLength ); I need for someone to show me how to setup and implement this field "   long** prgLengths" all examples I've seen shows long* prgLengths   in the header and prgLengths =   NULL; in the constructor. I tried that in my program and it came up with an error(compiler) that last two varables not implemented, meaning long** prgLengths and int nMaxLength . I have a CString that can at times greatly exceed the max of 255 char. That's why I need to implement the RFX_Text_Bulk function, but I can't find an example to show me how to do so. Can anyone show me how with a working example.   Please note that most times this varable will not be longer that 255 char, then there are times that it will!

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

    C / C++ / MFC tutorial c++ help workspace

  • Why I cannot have a ListControl in a CRecordView derived class?
    L Larry Mills Sr

    David, What my intentions are, is that when the User creates a "Recipe" that I will write the record of that recipe to the database under the "Recipe" table. The [Recipe].[MealPlan] varable will tell me when loading the Recipe Meal Plan for viewing a User plan for a Meal(ie, Special Occassion Meal= Birthday Party, Wedding, etc. (see uploaded new "CookIt.mdb" db) There is a Funtion in my program where the User selects ingredients and recipes they will use in developing a "Meal Plan" for a "Special Occassion Meal Plan". All Ingredients, upon User selections, are linked by the "MealPlanName", so that when the User selects a "MealPlan" from a list control that "MealPlan" is loaded. This works fine with my ".xml" database; I was trying to do the same thing with the MS Access DB. How would you go forth in accomplishing this with a MS Access DB? I redid the CRecordset (dsn) to only include the "Recipe" table. It doesn't give any erros, it goes through the AddNew() and then at UpDate() it clears the fields and no record is written to the db.

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

    C / C++ / MFC c++ database help question

  • Why I cannot have a ListControl in a CRecordView derived class?
    L Larry Mills Sr

    So how do I update, delete, write to the database? Do I have to make a recordset for each table? That sounds very strange.

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

    C / C++ / MFC c++ database help question

  • Why I cannot have a ListControl in a CRecordView derived class?
    L Larry Mills Sr

    At 9:00am CT I sent the files, including the db.   Please acknowledge recieving it, sometimes I don't get notification that the mail sent failed. Thanks

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

    C / C++ / MFC c++ database help question

  • Why I cannot have a ListControl in a CRecordView derived class?
    L Larry Mills Sr

    I used your code and it says: m_rDatabase.Open(NULL, NULL, FALSE, _T("ODBC;DSN=CookIt.mdb.dsn")); "file not found" if change it to: m_rDatabase.Open(NULL, NULL, FALSE, _T("ODBC;DSN=c:\\CookIt\\Program\\DataBases\\DB\\CookIt.mdb.dsn")); and it gave error: "Data Source name toog long and not found" I finally put the original under GetDefaultConnect(). Id gave an error of "ODBC does not support dynsets" the database was created as 2003 and I used the driver 6.001 which is supposed to work on either dynasets or snapshots? any ideas? I re-created the Recordset this time I selected "snapshot". Now it says "Recordset is read Only"? I don;t understand this!

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

    modified on Monday, December 7, 2009 8:32 PM

    C / C++ / MFC c++ database help question

  • Why I cannot have a ListControl in a CRecordView derived class?
    L Larry Mills Sr

    I copied that stuff from my program.   That's the stuff the wizard produced. I am using VS2008 completely updated. the MS Access database is called "CookIt.mdb" and with the DSN iit is now "CookIt.mdb.dsn"   Is this normal? Now, you state you have a CDatabase in Documents. Do I declare it in the Header?   and how do I get the CRecordset m_pSet set to that database? I may be asking this wrong. The wizard created a CRecordset class called MyDB(I renamed it). How does the database you created in CMyDoc use the recordset that the wizard created? You wrote: m_rDatabase.Open(NULL, NULL, FALSE, _T("ODBC;DSN=Gymnastics")); so if I used your code would mine be: m_rDatabase.Open(NULL, NULL, FALSE, _T("ODBC;DSN=CookIt")); Is this right?

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

    C / C++ / MFC c++ database help question

  • Why I cannot have a ListControl in a CRecordView derived class?
    L Larry Mills Sr

    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

    C / C++ / MFC c++ database help question
  • Login

  • Don't have an account? Register

  • Login or register to search.
  • First post
    Last post
0
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups