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

C / C++ / MFC

 
GeneralRe: Using RFX_Text_Bulk [modified] Pin
Larry Mills Sr13-Dec-09 4:28
Larry Mills Sr13-Dec-09 4:28 
GeneralRe: Using RFX_Text_Bulk Pin
Richard MacCutchan13-Dec-09 4:50
mveRichard MacCutchan13-Dec-09 4:50 
GeneralRe: Using RFX_Text_Bulk Pin
Larry Mills Sr13-Dec-09 6:18
Larry Mills Sr13-Dec-09 6:18 
GeneralRe: Using RFX_Text_Bulk Pin
Richard MacCutchan13-Dec-09 6:47
mveRichard MacCutchan13-Dec-09 6:47 
GeneralRe: Using RFX_Text_Bulk Pin
Larry Mills Sr13-Dec-09 9:20
Larry Mills Sr13-Dec-09 9:20 
GeneralRe: Using RFX_Text_Bulk Pin
Richard MacCutchan13-Dec-09 9:48
mveRichard MacCutchan13-Dec-09 9:48 
GeneralRe: Using RFX_Text_Bulk Pin
Richard MacCutchan13-Dec-09 23:19
mveRichard MacCutchan13-Dec-09 23:19 
GeneralRe: Using RFX_Text_Bulk Pin
Larry Mills Sr14-Dec-09 0:56
Larry Mills Sr14-Dec-09 0:56 
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.m_csAmt2;
               m_CookItDBSet.m_Unit2 = m_cRecipeData.m_csUnit2;
               m_CookItDBSet.m_Ingred3 = m_cRecipeData.m_csIngred3;
               m_CookItDBSet.m_Amt3 = m_cRecipeData.m_csAmt3;
               m_CookItDBSet.m_Unit3 = m_cRecipeData.m_csUnit3;
               m_CookItDBSet.m_Ingred4 = m_cRecipeData.m_csIngred4;
               m_CookItDBSet.m_Amt4 = m_cRecipeData.m_csAmt4;
               m_CookItDBSet.m_Unit4 = m_cRecipeData.m_csUnit4;
               m_CookItDBSet.m_Ingred5 = m_cRecipeData.m_csIngred5;
               m_CookItDBSet.m_Amt5 = m_cRecipeData.m_csAmt5;
               m_CookItDBSet.m_Unit5 = m_cRecipeData.m_csUnit5;
               m_CookItDBSet.m_Ingred6 = m_cRecipeData.m_csIngred6;
               m_CookItDBSet.m_Amt6 = m_cRecipeData.m_csAmt6;
               m_CookItDBSet.m_Unit6 = m_cRecipeData.m_csUnit6;
               m_CookItDBSet.m_Ingred7 = m_cRecipeData.m_csIngred7;//23
               m_CookItDBSet.m_Amt7 = m_cRecipeData.m_csAmt7;
               m_CookItDBSet.m_Unit7 = m_cRecipeData.m_csUnit7;
               m_CookItDBSet.m_Ingred8 = m_cRecipeData.m_csIngred8;
               m_CookItDBSet.m_Amt8 = m_cRecipeData.m_csAmt8;
               m_CookItDBSet.m_Unit8 = m_cRecipeData.m_csUnit8;//28
               m_CookItDBSet.m_Ingred9 = m_cRecipeData.m_csIngred9;
               m_CookItDBSet.m_Amt9 = m_cRecipeData.m_csAmt9;
               m_CookItDBSet.m_Unit9 = m_cRecipeData.m_csUnit9;
               m_CookItDBSet.m_Ingred10 = m_cRecipeData.m_csIngred10;
               m_CookItDBSet.m_Amt10 = m_cRecipeData.m_csAmt10;
               m_CookItDBSet.m_Unit10 = m_cRecipeData.m_csUnit10;
               m_CookItDBSet.m_Ingred11 = m_cRecipeData.m_csIngred11;
               m_CookItDBSet.m_Amt11 = m_cRecipeData.m_csAmt11;
               m_CookItDBSet.m_Unit11 = m_cRecipeData.m_csUnit11;
               m_CookItDBSet.m_Ingred12 = m_cRecipeData.m_csIngred12;
               m_CookItDBSet.m_Amt12 = m_cRecipeData.m_csAmt12;
               m_CookItDBSet.m_Unit12 = m_cRecipeData.m_csUnit12;
               m_CookItDBSet.m_Ingred13 = m_cRecipeData.m_csIngred13;
               m_CookItDBSet.m_Amt13 = m_cRecipeData.m_csAmt13;
               m_CookItDBSet.m_Unit13 = m_cRecipeData.m_csUnit13;
               m_CookItDBSet.m_Ingred14 = m_cRecipeData.m_csIngred14;
               m_CookItDBSet.m_Amt14 = m_cRecipeData.m_csAmt14;
               m_CookItDBSet.m_Unit14 = m_cRecipeData.m_csUnit14;
               m_CookItDBSet.m_Ingred15 = m_cRecipeData.m_csIngred15;
               m_CookItDBSet.m_Amt15 = m_cRecipeData.m_csAmt15;
               m_CookItDBSet.m_Unit15 = m_cRecipeData.m_csUnit15;
               m_CookItDBSet.m_Instructions = m_cRecipeData.m_csInstructions;//not saving 1024 char
               m_CookItDBSet.m_CookMethod = m_cRecipeData.m_csCookMethod;
               m_CookItDBSet.m_Servings = m_cRecipeData.m_csServings;
               m_CookItDBSet.m_BitMapPath = m_cRecipeData.m_csBitMapPath;
               m_CookItDBSet.m_Extra1 = m_cRecipeData.m_csExtra1;
               m_CookItDBSet.m_Extra2 = m_cRecipeData.m_csExtra2;//55
               m_CookItDBSet.m_Extra3 = m_cRecipeData.m_csExtra3;
               m_CookItDBSet.m_Extra4 = m_cRecipeData.m_csExtra4;
               SetID(m_CookItDBSet.m_ID);

               m_CookItDBSet.Update();                 
               m_CookItDBSet.Close();

               //UpdateAllViews(NULL);
               }//if
          }//TRY
     CATCH(CDBException, pDBException)
          {
          AfxMessageBox(pDBException->m_strError);
          }//CATCH
     END_CATCH
     }

The m_CookItDBSet.m_Instructions varable has all the data in it before the m_CookItDBSet.Update(); function is called, but checking the database in MS Access most of the data for Instructions is gone.

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

GeneralRe: Using RFX_Text_Bulk Pin
Richard MacCutchan14-Dec-09 4:48
mveRichard MacCutchan14-Dec-09 4:48 
QuestionSDI app executes CFrameWnd::OnCreate throwing Invalid Address specified to RtlValidateHeap Pin
sharion12-Dec-09 7:36
sharion12-Dec-09 7:36 
AnswerRe: SDI app executes CFrameWnd::OnCreate throwing Invalid Address specified to RtlValidateHeap Pin
Cedric Moonen12-Dec-09 22:18
Cedric Moonen12-Dec-09 22:18 
GeneralRe: SDI app executes CFrameWnd::OnCreate throwing Invalid Address specified to RtlValidateHeap Pin
sharion13-Dec-09 5:48
sharion13-Dec-09 5:48 
QuestionI can't get MAC by GetAdaptersAddresses [modified] Pin
DavidBrother12-Dec-09 4:57
DavidBrother12-Dec-09 4:57 
AnswerRe: I can't get MAC by GetAdaptersAddresses Pin
DavidBrother12-Dec-09 5:27
DavidBrother12-Dec-09 5:27 
GeneralRe: I can't get MAC by GetAdaptersAddresses Pin
Richard MacCutchan12-Dec-09 6:06
mveRichard MacCutchan12-Dec-09 6:06 
AnswerRe: I can't get MAC by GetAdaptersAddresses Pin
Richard MacCutchan12-Dec-09 6:11
mveRichard MacCutchan12-Dec-09 6:11 
GeneralRe: I can't get MAC by GetAdaptersAddresses Pin
DavidBrother12-Dec-09 16:34
DavidBrother12-Dec-09 16:34 
GeneralRe: I can't get MAC by GetAdaptersAddresses Pin
DavidBrother12-Dec-09 17:29
DavidBrother12-Dec-09 17:29 
QuestionTAPI send data Pin
cmos12-Dec-09 2:12
cmos12-Dec-09 2:12 
AnswerRe: TAPI send data Pin
Richard MacCutchan12-Dec-09 2:51
mveRichard MacCutchan12-Dec-09 2:51 
GeneralRe: TAPI send data Pin
cmos12-Dec-09 4:11
cmos12-Dec-09 4:11 
GeneralRe: TAPI send data Pin
Richard MacCutchan12-Dec-09 4:25
mveRichard MacCutchan12-Dec-09 4:25 
GeneralRe: TAPI send data Pin
cmos12-Dec-09 4:36
cmos12-Dec-09 4:36 
GeneralRe: TAPI send data Pin
Richard MacCutchan12-Dec-09 4:53
mveRichard MacCutchan12-Dec-09 4:53 
GeneralRe: TAPI send data Pin
cmos12-Dec-09 5:07
cmos12-Dec-09 5:07 

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.