ODBC – Retrieving Data From Sybase

Clovertech Forums Read Only Archives Cloverleaf Cloverleaf ODBC – Retrieving Data From Sybase

  • Creator
    Topic
  • #51803
    David Harrison
    Participant

      Cloverleaf 5.6 on Solaris 10

      I

    Viewing 3 reply threads
    • Author
      Replies
      • #71798
        Steve Carter
        Participant

          You should be able to add something like this right after the fetch:

          For multiple rows:

        • #71799
          Scott Folley
          Participant

            That is correct, what you need to remember is that the return value of the fetch is going to be the return code for the command.  In this case “SQL_SUCCESS”.

            These lines tell the driver to bind the value returned from column 1 to the variable sname and the value returned from column 2 to the variable fname.

            odbc SQLBindCol $hstmt 1 SQL_C_CHAR sname 30 pcbValue1

            odbc SQLBindCol $hstmt 2 SQL_C_CHAR fname 30 pcbValue2

          • #71800
            David Harrison
            Participant

              Thanks gentlemen, I

            • #71801
              David Harrison
              Participant

                Ok – I’ve got that one sorted

              • odbc SQLBindCol $hstmt 10 SQL_C_CHAR gname 30 pcbValue10
            Viewing 3 reply threads
            • The forum ‘Cloverleaf’ is closed to new topics and replies.