module IT {
module picosoft {
module jdbc {
   struct BindColIn_item {
      unsigned short icol;
      short fCType;
      long cbValueMax;
   };
   typedef sequence <BindColIn_item> BindColIn_seq;
   struct BindColOut_item {
      any rgbValue;
      long pcbValue;
   };
   typedef sequence <BindColOut_item> BindColOut_seq;
   struct Param_item {
      short fParamType;
      short fCType;
      short fSqlType;
      unsigned long cbColDef;
      short ibScale;
      any rgbValue;
      long cbValueMax;
      long pcbValue;
   };
   struct CommAttr_item {
      long length;
      long type;
      long precision;
      long scale;
   };
   typedef sequence <CommAttr_item> CommAttr_seq;
   typedef sequence <Param_item> Param_seq;
   typedef sequence <octet> OctetSequence;
   typedef sequence <any> AnySequence;
   struct Timestamp_struct {
      short year;
      short month;
      short day;
      short hour;
      short minute;
      short second;
      long fraction;
   };
   interface JDBCPicoDb {
      void SQLError (
         out long Return_code,
         in  unsigned long henv,
         in  unsigned long hdbc,
         in  unsigned long hstmt,
         out string outSqlState,
         out long outNativeError,
         out string outErrorMsg,
         in  short cbErrorMsgMax,
         out short pcbErrorMsg
      );
      void SQLTables (
         out long Return_code,
         in  unsigned long hstmt,
         in  string szTableQualifier,
         in  short cbTableQualifier,
         in  string szTableOwner,
         in  short cbTableOwner,
         in  string szTableName,
         in  short cbTableName,
         in  string szTableType,
         in  short cbTableType
      );
      void SQLPrepare (
         out long Return_code,
         in  unsigned long hstmt,
         in  string szSqlStr,
         in  long cbSqlStr
      );
      void SQLExecute (
         out long Return_code,
         in  unsigned long hstmt
      );
      void SQLExecDirect (
         out long Return_code,
         in  unsigned long hstmt,
         in  string szSqlStr,
         in  long cbSqlStr
      );
      void SQLNumResultCols (
         out long Return_code,
         in  unsigned long hstmt,
         out short pccol
      );
      void SQLRowCount (
         out long Return_code,
         in  unsigned long hstmt,
         out long pcrow
      );
      void SQLDescribeCol (
         out long Return_code,
         in  unsigned long hstmt,
         in  unsigned short icol,
         out string szColName,
         in  short cbColName,
         out short pcbColNameMax,
         out short pfSqlType,
         out unsigned long pcbColDef,
         out short pibScale,
         out short pfNullable
      );
      void SQLFetch (
         out long Return_code,
         in  unsigned long hstmt,
         out long num_cols
      );
      void SQLExtendedFetch (
         out long Return_code,
         in  unsigned long hstmt,
         in  unsigned short fetchType,
         in  long irow,
         out unsigned long pcrow,
         out unsigned short rgfRowStatus,
         out long num_cols
      );
      void SQLFetchBindCol (
         out long Return_code,
         in  unsigned long hstmt,
         in  BindColIn_seq bind_col_In,
         out BindColOut_seq bind_col_Out
      );
      void SQLExtendedFetchBindCol (
         out long Return_code,
         in  unsigned long hstmt,
         in  unsigned short fetchType,
         in  long irow,
         out unsigned long pcrow,
         out unsigned short rgfRowStatus,
         in  BindColIn_seq bind_col_In,
         out BindColOut_seq bind_col_Out
      );
      void SQLGetData (
         out long Return_code,
         in  unsigned long hstmt,
         in  unsigned short icol,
         in  short fCType,
         out any  rgbValue,
         in  long cbValueMax,
         out long pcbValue
      );
      void SQLGetAllData (
         out long Return_code,
         in  unsigned long hstmt,
         out AnySequence  rgbValue,
         out CommAttr_seq commAttr
      );
      void SQLFreeStmt (
         out long Return_code,
         in  unsigned long hstmt,
         in  unsigned short fOption
      );
      void SQLAllocEnv (
         out long Return_code,
         out unsigned long phenv
      );
      void SQLAllocConnect (
         out long Return_code,
         in  unsigned long henv,
         out unsigned long phdbc
      );
      void SQLConnect (
         out long Return_code,
         in  unsigned long hdbc,
         in  string szDSN,
         in  short cbDSN,
         in  string szUID,
         in  short cbUID,
         in  string szAuthStr,
         in  short cbAuthStr
      );
      void SQLAllocStmt (
         out long Return_code,
         in  unsigned long hdbc,
         out unsigned long phstmt
      );
      void SQLDisconnect (
         out long Return_code,
         in  unsigned long hdbc
      );
      void SQLFreeConnect (
         out long Return_code,
         in  unsigned long hdbc
      );
      void SQLFreeEnv (
         out long Return_code,
         in  unsigned long henv
      );
      void SQLCancel (
         out long Return_code,
         in  unsigned long hstmt
      );
      void SQLColAttributes (
         out long Return_code,
         in  unsigned long hstmt,
         in  unsigned short icol,
         in  unsigned short fDescType,
         out OctetSequence rgbDesc,
         in  short cbDescMax,
         out short pcbDesc,
         out long pfDesc
      );
      void SQLColumns (
         out long Return_code,
         in  unsigned long hstmt,
         in  string szTableQualifier,
         in  short cbTableQualifier,
         in  string szTableOwner,
         in  short cbTableOwner,
         in  string szTableName,
         in  short cbTableName,
         in  string szColumnType,
         in  short cbColumnType
      );
      void SQLGetConnectOption (
         out long Return_code,
         in  unsigned long hdbc,
         in  unsigned short fOption,
         out string pvParam_a,
         out long   pvParam_b
      );
      void SQLSetConnectOption (
         out long Return_code,
         in  unsigned long hdbc,
         in  unsigned short fOption,
         in  string pvParam_a,
         in  long   pvParam_b
      );
      void SQLGetStmtOption (
         out long Return_code,
         in  unsigned long hdbc,
         in  unsigned short fOption,
         out string pvParam_a,
         out long   pvParam_b
      );
      void SQLSetStmtOption (
         out long Return_code,
         in  unsigned long hdbc,
         in  unsigned short fOption,
         in  string pvParam_a,
         in  long   pvParam_b
      );
      void SQLBindParameter (
         out long Return_code,
         in  unsigned long hstmt,
         in  unsigned short ipar,
         in  short fParamType,
         in  short fCType,
         in  short fSqlType,
         in  unsigned long cbColDef,
         in  short ibScale,
         in  any rgbValue,
         in  long cbValueMax,
         in  long pcbValue
      );
      void SQLExecuteParams (
         out long Return_code,
         in  unsigned long hstmt,
         in  Param_seq Parameters
      );
      void SQLExecDirectParams (
         out long Return_code,
         in  unsigned long hstmt,
         in  string szSqlStr,
         in  long cbSqlStr,
         in  Param_seq Parameters
      );
      void SQLTransact (
         out long Return_code,
         in  unsigned long henv,
         in  unsigned long hdbc,
         in  unsigned short fType
      );
      void SQLStatistics (
         out long Return_code,
         in  unsigned long hstmt,
         in  string szTableQualifier,
         in  short cbTableQualifier,
         in  string szTableOwner,
         in  short cbTableOwner,
         in  string szTableName,
         in  short cbTableName,
         in  unsigned short fUnique,
         in  unsigned short fAccuracy
      );
      void SQLSpecialColumns (
         out long Return_code,
         in  unsigned long hstmt,
         in  unsigned short fColType,
         in  string szTableQualifier,
         in  short cbTableQualifier,
         in  string szTableOwner,
         in  short cbTableOwner,
         in  string szTableName,
         in  short cbTableName,
         in  unsigned short fScope,
         in  unsigned short fNullable
      );
      void SQLGetTypeInfo (
         out long Return_code,
         in  unsigned long hstmt,
         in  short fSqlType
      );
      void SQLGetCursorName (
         out long Return_code,
         in  unsigned long hstmt,
         out string szCursor,
         in  short cbCursorMax,
         out short pcbCursor
      );
      void SQLNumParams (
         out long Return_code,
         in  unsigned long hstmt,
         out short pcpar
      );
   };
};
};
};
