Data Integrator (ODBC) defining varchar(max) in bind paramet

Clovertech Forums Read Only Archives Cloverleaf Cloverleaf Data Integrator (ODBC) defining varchar(max) in bind paramet

  • Creator
    Topic
  • #52395
    Jim Kosloskey
    Participant

      I have a situation where I want to exchange varchar(max) parameters with a stored procedure (happens to be SQL Server but that does not matter).

      When binding the parameter is there a way to allow the length associated with the storage buffer to be acquired rather than specifically stating a length? Or must one state the length as the maximum size that a varchar(max), for example, can have.

      If the length must be specified, this seems to defeat the puprose of the (max) attribute which is to allow dynamic space allocation.

      This is using the Cloverelaf Data Integrator (Data Direct ODBC Drivers).

      I also may have a need to handle varbinary(max) as well so the answer has far reaching implications.

      Thanks

      email: jim.kosloskey@jim-kosloskey.com 30+ years Cloverleaf, 61 years IT – old fart.

    Viewing 3 reply threads
    • Author
      Replies
      • #74044
        Jim Kosloskey
        Participant

          Never mind – I figured it out and it is doable. Thanks

          email: jim.kosloskey@jim-kosloskey.com 30+ years Cloverleaf, 61 years IT – old fart.

        • #74045
          Tom Rioux
          Participant

            Jim,

            Can you share with me the code where you are binding the parameters to be shared with the stored procedure.   I’m wanting to incorporate some of this into some ODBC I’m doing here.

            Thanks…

          • #74046
            Steve Pringle
            Participant

              Jim,

              I’m also curious how you solved this.  We’re dealing with something similar.

              thanks,

              Steve

            • #74047
              Jim Kosloskey
              Participant

                Steve,

                In the SQLBindParameter invocation I set the fourth argument (I can never recall the actual name of the argument) to SQL_VARCHAR(0).

                The (0) does the trick.

                If you would like to discuss in more detail how we deploy Stored procedure exchange email me.

                email: jim.kosloskey@jim-kosloskey.com 30+ years Cloverleaf, 61 years IT – old fart.

            Viewing 3 reply threads
            • The forum ‘Cloverleaf’ is closed to new topics and replies.