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. SQL Problem

SQL Problem

Scheduled Pinned Locked Moved C / C++ / MFC
databasehelpc++sql-serversysadmin
7 Posts 3 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.
  • _ Offline
    _ Offline
    _anil_
    wrote on last edited by
    #1

    I want to insert a large binary data in to database( SQL server 2000 ) using VC6. First I tried with RFX_Binary, with CByteArray but in that case I was able to insert only 8000 byte of data. After that data trunctaion error occures. Then I tried with CLongBinary but in MFC RBX_LongBinary don't support. As I got assert at void AFXAPI RFX_LongBinary(CFieldExchange* pFX, LPCTSTR szName, CLongBinary& value) { : : : case CFieldExchange::BindParam: // CLongBinary parameters are not supported ASSERT(FALSE); : : : } Please suggest any method to try.

    Regards Anil

    C D 2 Replies Last reply
    0
    • _ _anil_

      I want to insert a large binary data in to database( SQL server 2000 ) using VC6. First I tried with RFX_Binary, with CByteArray but in that case I was able to insert only 8000 byte of data. After that data trunctaion error occures. Then I tried with CLongBinary but in MFC RBX_LongBinary don't support. As I got assert at void AFXAPI RFX_LongBinary(CFieldExchange* pFX, LPCTSTR szName, CLongBinary& value) { : : : case CFieldExchange::BindParam: // CLongBinary parameters are not supported ASSERT(FALSE); : : : } Please suggest any method to try.

      Regards Anil

      C Offline
      C Offline
      Chris Losinger
      wrote on last edited by
      #2

      the 'binary' data type itself can only hold 8K bytes. SQL data sizes

      image processing toolkits | batch image processing | blogging

      _ 1 Reply Last reply
      0
      • _ _anil_

        I want to insert a large binary data in to database( SQL server 2000 ) using VC6. First I tried with RFX_Binary, with CByteArray but in that case I was able to insert only 8000 byte of data. After that data trunctaion error occures. Then I tried with CLongBinary but in MFC RBX_LongBinary don't support. As I got assert at void AFXAPI RFX_LongBinary(CFieldExchange* pFX, LPCTSTR szName, CLongBinary& value) { : : : case CFieldExchange::BindParam: // CLongBinary parameters are not supported ASSERT(FALSE); : : : } Please suggest any method to try.

        Regards Anil

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

        What type of field is the CByteArray object mapped to in the SQL table? The char, varchar, binary and varbinary types are limited to 8,000 bytes.


        "Approved Workmen Are Not Ashamed" - 2 Timothy 2:15

        "Judge not by the eye but by the heart." - Native American Proverb

        _ 1 Reply Last reply
        0
        • D David Crow

          What type of field is the CByteArray object mapped to in the SQL table? The char, varchar, binary and varbinary types are limited to 8,000 bytes.


          "Approved Workmen Are Not Ashamed" - 2 Timothy 2:15

          "Judge not by the eye but by the heart." - Native American Proverb

          _ Offline
          _ Offline
          _anil_
          wrote on last edited by
          #4

          in SQL table its image type. When I write SQL statement in SQL manager I am able to insert more than 8K. Its in the MFC side giving data truncation exception.

          Regards Anil

          D 1 Reply Last reply
          0
          • C Chris Losinger

            the 'binary' data type itself can only hold 8K bytes. SQL data sizes

            image processing toolkits | batch image processing | blogging

            _ Offline
            _ Offline
            _anil_
            wrote on last edited by
            #5

            in SQL table its image type. When I write SQL statement in SQL manager I am able to insert more than 8K. Its in the MFC side giving data truncation exception. Regards Anil

            Regards Anil

            1 Reply Last reply
            0
            • _ _anil_

              in SQL table its image type. When I write SQL statement in SQL manager I am able to insert more than 8K. Its in the MFC side giving data truncation exception.

              Regards Anil

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

              What does your RFX_Binary() statement look like?


              "Approved Workmen Are Not Ashamed" - 2 Timothy 2:15

              "Judge not by the eye but by the heart." - Native American Proverb

              _ 1 Reply Last reply
              0
              • D David Crow

                What does your RFX_Binary() statement look like?


                "Approved Workmen Are Not Ashamed" - 2 Timothy 2:15

                "Judge not by the eye but by the heart." - Native American Proverb

                _ Offline
                _ Offline
                _anil_
                wrote on last edited by
                #7

                RFX_Binary(pFX, _T("[@File]"), mFileParam, 800000); here I have given size more that 8000

                Regards Anil

                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