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. error C2026: string too big, trailing characters truncated

error C2026: string too big, trailing characters truncated

Scheduled Pinned Locked Moved C / C++ / MFC
databasehelp
5 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.
  • R Offline
    R Offline
    Rahul Vaishnav
    wrote on last edited by
    #1

    Hello all, Please help me... I am creating Stored Procedure programmatically using db_command code is some thing like [ db_command(".. very long SQL stored procedure string....") ] my stored procedure command string is too long.. while compiling I am getting this "error C2026: string too big, trailing characters truncated" error. Thanks in advance.. :(

    K C D 3 Replies Last reply
    0
    • R Rahul Vaishnav

      Hello all, Please help me... I am creating Stored Procedure programmatically using db_command code is some thing like [ db_command(".. very long SQL stored procedure string....") ] my stored procedure command string is too long.. while compiling I am getting this "error C2026: string too big, trailing characters truncated" error. Thanks in advance.. :(

      C Offline
      C Offline
      CPallini
      wrote on last edited by
      #2

      According to this page [^] you may try to split it into two adjacent string literals. :)

      If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler. -- Alfonso the Wise, 13th Century King of Castile.
      This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong. -- Iain Clarke
      [My articles]

      R 1 Reply Last reply
      0
      • R Rahul Vaishnav

        Hello all, Please help me... I am creating Stored Procedure programmatically using db_command code is some thing like [ db_command(".. very long SQL stored procedure string....") ] my stored procedure command string is too long.. while compiling I am getting this "error C2026: string too big, trailing characters truncated" error. Thanks in advance.. :(

        K Offline
        K Offline
        KarstenK
        wrote on last edited by
        #3

        The cause: "string too big" try buildind a shorter SP. I am sute the too big string is poiting that you have written to much code than thought about it. :rolleyes:

        Greetings from Germany

        1 Reply Last reply
        0
        • C CPallini

          According to this page [^] you may try to split it into two adjacent string literals. :)

          If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler. -- Alfonso the Wise, 13th Century King of Castile.
          This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong. -- Iain Clarke
          [My articles]

          R Offline
          R Offline
          Rahul Vaishnav
          wrote on last edited by
          #4

          Thanks you for reply.. I had already visited this link .. I have tried this but still I am getting same error. :confused:

          1 Reply Last reply
          0
          • R Rahul Vaishnav

            Hello all, Please help me... I am creating Stored Procedure programmatically using db_command code is some thing like [ db_command(".. very long SQL stored procedure string....") ] my stored procedure command string is too long.. while compiling I am getting this "error C2026: string too big, trailing characters truncated" error. Thanks in advance.. :(

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

            Instead of doing something like:

            str = "very long SQL stored procedure string";

            try this instead:

            str = "very long "
            str += "SQL stored ";
            str += "procedure string";

            Strings can be as long as you have enough memory for. The compiler is simply complaining about your string literals.

            "Love people and use things, not love things and use people." - Unknown

            "To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne

            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