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
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. "Please enter no more than 256 characters."

"Please enter no more than 256 characters."

Scheduled Pinned Locked Moved C / C++ / MFC
c++databasehelptutorial
8 Posts 4 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • V Offline
    V Offline
    Vladimir Georgiev
    wrote on last edited by
    #1

    I am writin a simple ODBC application in Visual C++ to manipulate data from an Access database file. I have a memo field in the Access DB and a multiline edit control in the app. When I try to write a larger text (more than 256 symbols), and try UpdateData(), I get the following error message: "Please enter no more than 256 characters." I tried to set the control's max. text limit by calling CEdit::SetLimitText(64000) for example, but it did not work... If you have any clue, please respond asap... Thanks! "Needless redundancy is the hobgoblin of software engineering." - Peter Darnell

    N 1 Reply Last reply
    0
    • V Vladimir Georgiev

      I am writin a simple ODBC application in Visual C++ to manipulate data from an Access database file. I have a memo field in the Access DB and a multiline edit control in the app. When I try to write a larger text (more than 256 symbols), and try UpdateData(), I get the following error message: "Please enter no more than 256 characters." I tried to set the control's max. text limit by calling CEdit::SetLimitText(64000) for example, but it did not work... If you have any clue, please respond asap... Thanks! "Needless redundancy is the hobgoblin of software engineering." - Peter Darnell

      N Offline
      N Offline
      Nish Nishant
      wrote on last edited by
      #2

      Vladimir Georgiev wrote: If you have any clue, please respond asap... Looks like you have set a DDX limit on the edit control. Verify this using class wizard if you are using VC++ 6.0, if VC++.NET check the DDX message map Nish


      Author of the romantic comedy Summer Love and Some more Cricket [New Win] Review by Shog9 Click here for review[NW]

      V 1 Reply Last reply
      0
      • N Nish Nishant

        Vladimir Georgiev wrote: If you have any clue, please respond asap... Looks like you have set a DDX limit on the edit control. Verify this using class wizard if you are using VC++ 6.0, if VC++.NET check the DDX message map Nish


        Author of the romantic comedy Summer Love and Some more Cricket [New Win] Review by Shog9 Click here for review[NW]

        V Offline
        V Offline
        Vladimir Georgiev
        wrote on last edited by
        #3

        Nishant, I am using VC++ 6.0. I have not set any limit (Maximum Characters box in "Member Variables" tab). this field is empty. Is this the correct place I am looking in? If you have any other idea, please let me know... "Needless redundancy is the hobgoblin of software engineering." - Peter Darnell

        N 1 Reply Last reply
        0
        • V Vladimir Georgiev

          Nishant, I am using VC++ 6.0. I have not set any limit (Maximum Characters box in "Member Variables" tab). this field is empty. Is this the correct place I am looking in? If you have any other idea, please let me know... "Needless redundancy is the hobgoblin of software engineering." - Peter Darnell

          N Offline
          N Offline
          Nish Nishant
          wrote on last edited by
          #4

          Can you post more code? The fact that you get this mesgbox only when you call UpdateData was what prompted me to think that it is a DDX check. With the existing info I dont really have any other smart ideas. Perhaps more code will make things clearer. Nish


          Author of the romantic comedy Summer Love and Some more Cricket [New Win] Review by Shog9 Click here for review[NW]

          V 1 Reply Last reply
          0
          • N Nish Nishant

            Can you post more code? The fact that you get this mesgbox only when you call UpdateData was what prompted me to think that it is a DDX check. With the existing info I dont really have any other smart ideas. Perhaps more code will make things clearer. Nish


            Author of the romantic comedy Summer Love and Some more Cricket [New Win] Review by Shog9 Click here for review[NW]

            V Offline
            V Offline
            Vladimir Georgiev
            wrote on last edited by
            #5

            Here is the function and the place it fails: void CContactsView::OnSave() { UpdateData(true); //---------------> ERROR HERE! m_pSet->AddNew(); if (m_pSet->CanUpdate()) { m_pSet->Update(); } if (!m_pSet->IsEOF()) { m_pSet->MoveLast(); } m_pSet->Requery(); UpdateData(false); } "Needless redundancy is the hobgoblin of software engineering." - Peter Darnell

            M N 2 Replies Last reply
            0
            • V Vladimir Georgiev

              Here is the function and the place it fails: void CContactsView::OnSave() { UpdateData(true); //---------------> ERROR HERE! m_pSet->AddNew(); if (m_pSet->CanUpdate()) { m_pSet->Update(); } if (!m_pSet->IsEOF()) { m_pSet->MoveLast(); } m_pSet->Requery(); UpdateData(false); } "Needless redundancy is the hobgoblin of software engineering." - Peter Darnell

              M Offline
              M Offline
              Mike Nordell
              wrote on last edited by
              #6

              Vladimir Georgiev wrote: UpdateData(true); //---------------> ERROR HERE! Maybe you should set a DDX limit to not get the default limit? Just an idea...

              A 1 Reply Last reply
              0
              • V Vladimir Georgiev

                Here is the function and the place it fails: void CContactsView::OnSave() { UpdateData(true); //---------------> ERROR HERE! m_pSet->AddNew(); if (m_pSet->CanUpdate()) { m_pSet->Update(); } if (!m_pSet->IsEOF()) { m_pSet->MoveLast(); } m_pSet->Requery(); UpdateData(false); } "Needless redundancy is the hobgoblin of software engineering." - Peter Darnell

                N Offline
                N Offline
                Nish Nishant
                wrote on last edited by
                #7

                Vladimir Can you also post your DDX message maps? Nish


                Author of the romantic comedy Summer Love and Some more Cricket [New Win] Review by Shog9 Click here for review[NW]

                1 Reply Last reply
                0
                • M Mike Nordell

                  Vladimir Georgiev wrote: UpdateData(true); //---------------> ERROR HERE! Maybe you should set a DDX limit to not get the default limit? Just an idea...

                  A Offline
                  A Offline
                  Anonymous
                  wrote on last edited by
                  #8

                  I tried that using Class Wizzard. Did not work...

                  1 Reply Last reply
                  0
                  Reply
                  • Reply as topic
                  Log in to reply
                  • Oldest to Newest
                  • Newest to Oldest
                  • Most Votes


                  • Login

                  • Don't have an account? Register

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