Submitting requests

These functions submit requests:

  • SQLExecute

    This runs the prepared statements.

    odbc SQLExecute $hstmt
  • SQLExecDirect

    This prepares and runs a statement. This is the fastest method for running one instance.

    set drop "DROP TABLE NAMEID"
    odbc SQLExecDirect $hstmt $drop SQL_NTS
  • SQLNativeSql

    This shows the translated SQL string as it would be passed to the data source.

    odbc SQLNativeSql $hdbc "SELECT * FROM MYTABLE" \
        SQL_NTS OutStatementText 128 TextLength2Ptr
  • SQLDescribeParam

    This supplies four parameters describing a parameter marker in a prepared SQL statement.

    odbc SQLDescribeParam $hstmt 1 DataTypePtr \
         ParameterSizePtr DecimalDigitsPtr NullablePtr 
  • SQLNumParams

    This supplies the number of parameters in a statement.

    odbc SQLNumParams $hstmt ParameterCountPtr 
  • SQLParamData

    This retrieves the value of the ParameterValuePtr parameter. This parameter was previously set on an invocation to SQLBindParamter for a parameter that is specified at statement running time. This is usually the parameter number.

    odbc SQLParamData $hstmt ValuePtrPtr
  • SQLPutData

    This provides the "data at running time" data.

    odbc SQLPutData $hstmt id 0