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. CString and Huge SQL Queries

CString and Huge SQL Queries

Scheduled Pinned Locked Moved C / C++ / MFC
databasequestion
6 Posts 5 Posters 1 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.
  • S Offline
    S Offline
    sdancer75
    wrote on last edited by
    #1

    Hi, Does the CString has a max character limit ? Because i can not save to the member variables of CString type very big SQL queries (about 500 characters long). Any suggestion ? sdancer

    M D T A 4 Replies Last reply
    0
    • S sdancer75

      Hi, Does the CString has a max character limit ? Because i can not save to the member variables of CString type very big SQL queries (about 500 characters long). Any suggestion ? sdancer

      M Offline
      M Offline
      Michael P Butler
      wrote on last edited by
      #2

      sdancer75 wrote:

      Does the CString has a max character limit ? Because i can not save to the member variables of CString type very big SQL queries (about 500 characters long). Any suggestion ?

      CString has limits but it certainly isn't limited to 500 characters. How are you saving your query into the CString? Michael CP Blog [^] Development Blog [^]

      1 Reply Last reply
      0
      • S sdancer75

        Hi, Does the CString has a max character limit ? Because i can not save to the member variables of CString type very big SQL queries (about 500 characters long). Any suggestion ? sdancer

        D Offline
        D Offline
        David Crow
        wrote on last edited by
        #3

        sdancer75 wrote:

        Does the CString has a max character limit ?

        Yes, something on the order of 231 bytes, give or take a few.


        "Take only what you need and leave the land as you found it." - Native American Proverb

        1 Reply Last reply
        0
        • S sdancer75

          Hi, Does the CString has a max character limit ? Because i can not save to the member variables of CString type very big SQL queries (about 500 characters long). Any suggestion ? sdancer

          T Offline
          T Offline
          Tim Smith
          wrote on last edited by
          #4

          CString doesn't have limits, your code does. Before blaming someone elses code for an error, first try to find the bug in your code. CString does not have a limit of 500 characters. You are wasting your time looking for your problem in CString. Tim Smith I'm going to patent thought. I have yet to see any prior art.

          1 Reply Last reply
          0
          • S sdancer75

            Hi, Does the CString has a max character limit ? Because i can not save to the member variables of CString type very big SQL queries (about 500 characters long). Any suggestion ? sdancer

            A Offline
            A Offline
            AORD
            wrote on last edited by
            #5

            "A CString object can store up to INT_MAX (2,147,483,647) characters." That is what it says in the MSDN libraray.

            S 1 Reply Last reply
            0
            • A AORD

              "A CString object can store up to INT_MAX (2,147,483,647) characters." That is what it says in the MSDN libraray.

              S Offline
              S Offline
              sdancer75
              wrote on last edited by
              #6

              Hey guys, Thank you for your replies. It was my mistake. I confused since the debugger shows only a small part of the CString Variable and with my error in the code i had problems. I solved. Thank you to All ! Regards, sdancer

              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