home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 7 / 07.iso / c / c016 / 3.ddi / CORINC.PAK / SQCMAIN.H < prev    next >
Encoding:
C/C++ Source or Header  |  1993-09-30  |  22.7 KB  |  612 lines

  1.  
  2. //
  3. // *
  4. // * Copyright (c) 1992                Coromandel Industries Inc.
  5. // *
  6. // * All rights reserved. No part of this program or publication may be 
  7. // * reproduced, transcribed, stored in a retrieval system, or translated
  8. // * into any language or computer language, in any form or by any means, 
  9. // * electronic, mechanical, magnetic, optical, chemical, biological, or
  10. // * otherwise, without the prior written permission of :
  11. // *
  12. // *            Coromandel Industries Inc.,
  13. // *
  14. // *        70-15, Austin St., 3Rd Floor, Forest Hills, NY 11375.
  15. // * 
  16. // * System       :    INTEGRA VDB SQL Controls  
  17. // * Module       :    VDB Engine
  18. // * Filename     :    sqcmain.h
  19. // * Description  :    header file for call interface
  20. //
  21.  
  22.  
  23.  
  24. // Version
  25.  
  26. #define SQC_VERSION    120        // major version 1.20
  27.  
  28. // object types
  29.  
  30. #define    SQC_FORM    100        // the object type is form
  31. #define    SQC_CONTROL    101        // the object type is a child control
  32. #define    SQC_DATASTREAM    102        // the object type is a data source
  33. #define    SQC_CONNECTION    103        // the object type is connection
  34. #define    SQC_ENVIRONMENT    104        // the object type is ODBC henv
  35. #define    SQC_DBPROP    105        // the object type is connection
  36.                     // capability mask
  37.  
  38. // warning codes
  39.  
  40. #define WREPLACE    10000        // an object has been replaced
  41.  
  42. // error codes  
  43.  
  44.  
  45. #define ERRBASE        -10000
  46. #define ENORES        ERRBASE - 100    // no resources left
  47. #define BADPARAM    ERRBASE - 200    // illegal argument 
  48. #define ESUBSTI        ERRBASE - 300    // substitution failed 
  49. #define EBADHAND    ERRBASE - 600    // bad app handle
  50. #define EBADWND        ERRBASE - 700    // bad window  handle
  51. #define EBADCTRL    ERRBASE - 900    // bad control handle  
  52. #define EDBERR        ERRBASE -1000    // database error
  53. #define EQUERY        ERRBASE -1200    // error with result columncnt
  54. #define EBADFORM    ERRBASE -1500    // bad form  
  55. #define EBADRANGE    ERRBASE -1600    // bad control 
  56. #define EBADCOL        ERRBASE -1800    // bad column syntax  
  57. #define EBADCURS    ERRBASE -1900    // bad cursor syntax  
  58. #define ESYNTAX        ERRBASE -2100    // bad syntax    
  59. #define EBADBIND     ERRBASE -2200    // bad bind structure    
  60. #define EBADPORT     ERRBASE -2300    // bad port name    
  61. #define ESEQERR        ERRBASE -2400    // sequence error
  62. #define EIMPEXP        ERRBASE -2500    // import export error
  63. #define ECURSTATE    ERRBASE -2600    // bad cursor state
  64. #define SS_EOF        ERRBASE -2700    // End of cursor
  65. #define ENOTINST    ERRBASE -2800    // Not installed properly
  66. #define EACCESS        ERRBASE -2900    // Access violation 
  67. #define EINTERR        ERRBASE -3100    // Internal error
  68. #define ENOCOL        ERRBASE -3300    // no column is selected
  69. #define ENORESULT    ERRBASE -3400    // no result set
  70. #define ENOOBJ        ERRBASE -3600    // no object exists
  71. #define ECOLSEQ        ERRBASE -3700    // column sequence error
  72. #define ETRUNC        ERRBASE -3800    // data is truncated
  73. #define ETMPFILE    ERRBASE -3900    // error in temp file of cursor
  74. #define EVALERR        ERRBASE -4100    // Error in expression evaluation
  75. #define EBADNAME    ERRBASE -4200    // Name is not a valid object
  76. #define ETRIG        ERRBASE -4400    // Trigger string error
  77. #define EDATEERR    ERRBASE -4500    // Date format conversion error
  78. #define ECANCEL        ERRBASE -4600    // Cancelled by user
  79. #define ELASTERROR    ERRBASE -4700    // Last error
  80. #define SS_EOR        ERRBASE -4800    // End of result set
  81.  
  82.  
  83. // success codes 
  84.  
  85. #define    SS_SUCCESS     0
  86.  
  87. // application mode bits
  88.  
  89. #define SQC_APP_SHOWERR     1        // display all errors
  90. #define SQC_APP_SHOWSQL     2        // display all sql statements 
  91. #define SQC_APP_SHOWTEXT 4        // show sql statements in text box
  92. #define SQC_APP_LOG     8        // log operations 
  93. #define SQC_APP_DESIGN      16        // design mode operations allowed
  94. #define SQC_APP_NOCURSORNAME 32        // don't show cursor name for showsql
  95. #define SQC_APP_NO3rdPARTY 64        // No automatic support for 3rd party
  96.                     // controls
  97.  
  98.  
  99. // connect modes
  100.  
  101. #define SQC_CONNECT    3        // use connect
  102. #define SQC_DRVCONNECT  4        // use driver connect
  103.  
  104. // types of cursors
  105.  
  106. #define SQC_TABLES        1        // list of tables
  107. #define SQC_COLUMNS        2        // list of columns
  108. #define SQC_SELECT        3        // select statement
  109. #define SQC_GENERIC        4        // generic non select stmt
  110. #define SQC_STATISTICS        5        // list of indexes
  111. #define SQC_SPECIALCOLS        6        // list of special columns
  112. #define SQC_IMPORT        7        // import file
  113. #define SQC_EXPORT        8        // export file
  114. #define SQC_TYPEINFO        9        // sql data type info
  115. #define SQC_MEMORY        10        // memory cursor
  116. #define SQC_LOOKUP        11        // lookup cursor
  117. #define SQC_PROCLIST        12        // Procedure list
  118. #define SQC_PROCEDURE        13        // Procedure 
  119. #define SQC_PASSTHROUGH        14        // Pass through 
  120. #define SQC_PROCCOLS        15        // Procedure columns 
  121.  
  122.  
  123. // access modes for cursors
  124.  
  125. #define SQC_ACC_UPD        1        // allow updates
  126. #define SQC_ACC_INS        2        // allow inserts
  127. #define SQC_ACC_DEL        4        // allow deletes
  128. #define SQC_ACC_MODIFY      7        // or of upd,del and ins
  129. #define SQC_ACC_BROWSE        8        // allow browsing(next and prev)
  130. #define SQC_ACC_QUERY        16        // allow query from form
  131. #define SQC_ACC_SNAPSHOT     32        // set snapshot mode 
  132. #define SQC_ACC_RESERVED     64        // must be zero 
  133. #define SQC_ACC_PRIMKEY     128        // first col is prim key part 1
  134. #define SQC_ACC_PRIMKEY2     256        // second col is prim key part 2
  135. #define SQC_ACC_KEYSET         1024        // only keys are saved in curs
  136. #define SQC_ACC_ENBUTTON    2048        // enable button enable disable
  137. #define SQC_ACC_AUTO        4096        // set best accessmode 
  138. #define SQC_ACC_NORUN        (1L << 13)    // no run cursor for modify
  139. #define SQC_ACC_ENSUB        (1L << 14)    // enable substitution
  140. #define SQC_ACC_FETCHALL     (1L << 16)    // fetch event for all fetches
  141. #define SQC_ACC_INSEVENT     (1L << 17)    // enable events for insert
  142. #define SQC_ACC_UPDEVENT     (1L << 18)    // enable events for update
  143. #define SQC_ACC_DELEVENT     (1L << 19)    // enable events for delete
  144. #define SQC_ACC_FETCHEVENT     (1L << 20)    // enable events for fetch
  145. #define SQC_ACC_FIELDEVENT     (1L << 21)    // enable events for field
  146. #define SQC_ACC_ROWSEL         (1L << 22)    // enable events for row sel
  147. #define SQC_ACC_STATEEVENT    (1L << 23)    // enable events for state
  148. #define    SQC_ACC_CONFUPD        (1L << 28)    // confirm all updates
  149. #define    SQC_ACC_CONFDEL        (1L << 29)    // confirm all deletes
  150. #define    SQC_ACC_CONFINS        (1L << 30)    // confirm all inserts
  151. #define SQC_ACC_MODIFYEVENT     SQC_ACC_INSEVENT \
  152.                 + SQC_ACC_UPDEVENT \
  153.                 + SQC_ACC_DELEVENT \
  154.                 + SQC_ACC_ROWSEL
  155.  
  156.  
  157. // data source and visual control types as indexes
  158.  
  159. #define SQC_DSI_ODBC       0        //
  160. #define SQC_CTI_ThTXB       16         // thunder text box
  161. #define SQC_CTI_MGRID       17        // thunder grid
  162. #define SQC_CTI_CGRID       18        // CI grid
  163. #define SQC_CTI_CBUTTON    19        //  Button controls 
  164. #define SQC_CTI_LB       20        //  List Box control
  165. #define SQC_CTI_CMB       21        //  Combo Box control
  166. #define SQC_CTI_CHKBOX       22        //  CheckBox control
  167. #define SQC_CTI_RB       23        //  Radio Button Control
  168. #define SQC_CTI_FRAME       24        //  Frame control
  169. #define SQC_CTI_3rdPARTY   25        //  3rd party control
  170.  
  171.  
  172. // fetch browse modes    
  173.  
  174. #define  SQC_CURS_NEXT     0
  175. #define  SQC_CURS_FIRST     1
  176. #define  SQC_CURS_LAST     2
  177. #define  SQC_CURS_PREV     3
  178. #define  SQC_CURS_ABS     4
  179. #define  SQC_CURS_REL     5
  180. #define  SQC_CURS_ALL      6
  181. #define  SQC_CURS_CURR      7
  182.  
  183. #define  SQC_QRY_AND         0        //
  184. #define  SQC_QRY_OR         1        //
  185. #define  SQC_QRY_LIKEPOST    2        //
  186. #define  SQC_QRY_LIKEPRE     4        //
  187.  
  188. // mask edit property definitions
  189.  
  190. #define SQC_MASK_DISABLEMASK    10
  191. #define SQC_MASK_DISPLAYONLY    11
  192.  
  193. // date formats
  194.  
  195. #define SQC_DATE_FRDISP        100        // from display format to ISO
  196. #define SQC_DATE_FRDRV        101        // from driver format to ISO
  197. #define SQC_DATE_TODISP        102        // from ISO format to display
  198. #define SQC_DATE_TODRV        103        // from ISO format to driver
  199.  
  200. //  build data source modes and action codes      
  201.  
  202. // flag bits for bind column host flag variable
  203.  
  204. #define SQC_COL_NULLBIT        1    // if set null value
  205. #define SQC_COL_INSERT        2    // if set insert op
  206. #define SQC_COL_UPDATE        4    // if set update op
  207. #define SQC_COL_DELETE        8    // if set delete op
  208. #define SQC_COL_DATATRUNC    16    // if set data truncated
  209. #define SQC_COL_MARKED        32    // if set row/col is marked
  210. #define SQC_COL_NOMODIFY    64    // if set row can't be modified/deleted
  211.  
  212. // mode bits for SQcNewRecord Call
  213.  
  214. #define SQC_NEW_NOINSERT    1    // NewRecord will not automaticall
  215.                     // insert the new record
  216.  
  217.  
  218. // return values for events
  219.  
  220. #define    SQC_EVENT_CONTINUE    0    // continue the operation
  221. #define SQC_EVENT_ABORT        9    // abort the operation
  222. #define SQC_EVENT_NEWDATA    2    // continue after accepting new data
  223.  
  224. // Cursor Event State codes returned for Cursor states
  225.  
  226. #define SQC_EVENT_OPEN        100    // event occurs before first record
  227. #define SQC_EVENT_CLOSE        101    // event occurs after close
  228. #define SQC_EVENT_LASTREC    102    // event occurs after last record
  229.                     // is read from database
  230. #define SQC_EVENT_EXEC        103    // event occurs before execution of
  231.                     // preparable statement
  232.  
  233. // Event PREFETCH event flags
  234.  
  235. #define SQC_FETCH_FIRST        200    // fetching first time from database
  236. #define SQC_FETCH_REFETCH    201    // refetching from database
  237. #define SQC_FETCH_BROWSE    202    // fetching from cursor while browsing
  238.  
  239. // event constants-- the order must be same as defined in custom control
  240.  
  241. #define SQC_CURS_ERROR        0
  242. #define SQC_CURS_PREDELETE    1
  243. #define SQC_CURS_PREFETCH    2
  244. #define SQC_CURS_PREFIELD    3
  245. #define SQC_CURS_PREINSERT    4
  246. #define SQC_CURS_PREUPDATE    5
  247. #define SQC_CURS_ROWSEL        6
  248. #define SQC_CURS_STATE        7
  249.  
  250. // trigger types
  251.  
  252. #define SQC_TRG_ROWSEL     100    // row selected ( from list box or ctrl obj)
  253. #define SQC_TRG_FETCH     101    // fetch trigger (cursor object)
  254. #define SQC_TRG_INSERT     102    // insert trigger (cursor object)
  255. #define SQC_TRG_UPDATE     103    // update trigger (cursor object)
  256.  
  257. // Connection options including transaction isolation options
  258. // These options are mask bits in DBmode property in CIDS and
  259. // lparam of SQcSetDBmode() function
  260. // ENISO would set the isolation level through SetConnectOption()
  261. // if ENISO bit is not set, the isolation level is as per default 
  262. // ENAUTOC bit would set autocommit on or off depending on AUTOCOMMIT bit
  263. // if ENAUTO bit is not set autocommit is as per default
  264. // ENSCOPE would choose the fscope option for SpecialColumns() call
  265. // if ENSCOPE is not set previous values are used and the default is
  266. // CURROW. 
  267. // if ENROWID is set, T1AST and ROWID bits are transfered. For
  268. // Integra database, these two bits T1AST and ROWID must be set
  269.  
  270. #define SQC_DBM_ISO0    1L        // Isolation level READ_UNCOMMITTED
  271. #define SQC_DBM_ISO1    (1L << 1)    // Isolation level READ_COMMITTED
  272. #define SQC_DBM_ISO2    (1L << 2)    // Isolation level REPEATABLE_READ
  273. #define SQC_DBM_ISO3    (1L << 3)    // Isolation level SERIALIZABLE
  274. #define SQC_DBM_ISO4    (1L << 4)    // Isolation level VERSIONING
  275. #define SQC_DBM_ENISO   (1L << 5)    // Set Isolation Level
  276. #define SQC_DBM_AUTOCOMMIT  (1L << 6)    // auto commit 
  277. #define SQC_DBM_ENAUTOC  (1L << 7)    // set auto commit 
  278. #define SQC_DBM_TRANS    (1L << 8)    // special  cols in TRANSACTION scope
  279. #define SQC_DBM_SESS    (1L << 9)    // special  cols in SESSION scope
  280. #define SQC_DBM_CURROW    (1L << 10)    // special  cols in CURROW scope
  281. #define SQC_DBM_ENSCOPE    (1L << 11)    // set scope option for special cols
  282. #define SQC_DBM_T1AST    (1L << 16)    // for select * qualify with table name
  283. #define SQC_DBM_ROWID    (1L << 17)    // database has special ROWID 
  284. #define SQC_DBM_ENROWID    (1L << 18)    // set database rowid  & T1AST  
  285. #define SQC_DBM_1STMT    (1L << 19)    // Only one statement can be active
  286. #define SQC_DBM_NOAST    (1L << 20)    // * cannot be qualified by tablename
  287. #define SQC_DBM_OUTERJ    (1L << 22)    // Outer joins supported
  288. #define SQC_DBM_OUTERFJ    (1L << 23)    // Full outer joins supported
  289. #define SQC_DBM_INSPARAM (1L << 24)    // Inserts through params
  290. #define SQC_DBM_DELIMIT    (1L << 25)    // Delimit the column names
  291. #define SQC_DBM_ENGEN    (1L << 31)    // enable general flags
  292.  
  293. #define SQC_DBM_ENABLES     SQC_DBM_ENISO \
  294.                 + SQC_DBM_ENAUTOC \
  295.                 + SQC_DBM_ENSCOPE \
  296.                 + SQC_DBM_ENROWID \
  297.                 + SQC_DBM_ENGEN 
  298.  
  299.  
  300. // Operation codes to be used in ButtonControl call
  301.  
  302. #define OP_NONE            0    // No operation
  303. #define OP_CLEARFORM        1    // clear the form in actionstr
  304. #define OP_CLEARQUERY        2    // clear text fields bound to cursor
  305. #define OP_CLOSECURSOR        3    // close the cursor  
  306. #define OP_DELETE        4    // delete the current record
  307. #define OP_CURR            5    // refetch the current record
  308. #define OP_FIRST        6    // fetch the first record
  309. #define OP_LAST            7    // fetch the last record
  310. #define OP_NEXT            8    // fetch the next record
  311. #define OP_PREV            9    // fetch the previous record
  312. #define OP_INSERT        10    // insert record
  313. #define OP_OPEN            11    // oper the cursor
  314. #define OP_QBF            12    // query by form
  315. #define OP_UPDATE        13    // update the current record
  316. #define OP_EXECUTECHAIN        14    // execute the chain of cursors
  317. #define OP_NEWRECORD        15    // insert a new record using defaults
  318. #define OP_LASTCOMMAND        16    // Place holder 
  319.  
  320.  
  321. // sql data types to be used while binding host address 
  322.  
  323.  
  324. #define SQC_CHAR              1
  325. #define SQC_NUMERIC           2
  326. #define SQC_DECIMAL           3
  327. #define SQC_INTEGER           4
  328. #define SQC_SMALLINT          5
  329. #define SQC_FLOAT             6
  330. #define SQC_REAL              7
  331. #define SQC_DOUBLE            8
  332. #define SQC_DATE                9
  333. #define SQC_TIME               10
  334. #define SQC_TIMESTAMP          11
  335. #define SQC_VARCHAR          12
  336. #define SQC_LONGVARCHAR        -1
  337. #define SQC_BINARY             -2
  338. #define SQC_VARBINARY          -3
  339. #define SQC_LONGVARBINARY      -4
  340. #define SQC_BIGINT             -5
  341. #define SQC_TINYINT            -6
  342. #define SQC_BIT                -7
  343.  
  344. #define SQC_INTEGRA_CURRENCY    14
  345.  
  346.  
  347.  
  348. // structure definitions
  349. // query event structure. C++ 8.0 event handler has the last parameter
  350. // LPVOID pointing to the following structure. 
  351.  
  352.  typedef struct tagCIGenEvent {
  353.     long  FAR *paction;    // set to CONTINUE 
  354.     long  FAR *plparam;    // event dependent long parameter
  355.     long  FAR *prownum;    // row number for the event ( 1 based)
  356.                 // or operation
  357.     long  FAR *pdstrhand;    // data stream handle
  358.     } CIGENEVENT;
  359.  
  360. // to transfer large amounts of data from LONGVARBINARY or LONGVARCHAR
  361. // address of the following structure may be bound as user buffer with
  362. // buffersize set to 0 in SQcBindColumn() call. Data is transfered to and
  363. // from the opened file. Count field may be given as 0 for complete transfer
  364.  
  365.  typedef struct tagSQcBindDef {
  366.      long    offset;        //while reading from database offset into
  367.                 // database field
  368.                 // while writing to database field,offset
  369.                 // into the source file
  370.     long     count;        // maximum no of bytes to be transfered
  371.     HFILE    filehand;    // filehandle of opened file. The file
  372.                 // must exist
  373.     } SQCBINDDEF;
  374.  
  375.  typedef struct tagSQcErrInfo {            
  376.     char       SqlState[8];    // these three members are same
  377.     long       NativeError;    // as the values returned by
  378.     char       ErrorMsg[514];    // odbc SQLError call
  379.     void       FAR *hdbc;    // HDBC handle
  380.     void    FAR *hstmt;    // HSTMT handle
  381.     long    majorstate;    // internal state
  382.     long    minorstate;    // internal state
  383.     long    errorcnt;    // cumulative error count
  384.     long    revision;    // revision number
  385.     int    retcode;    // return code from call
  386.     short   errortype;    // +ve info and -ve error
  387.     long     param[4];    // 4 longs reserved 
  388.     } SQCERRINFO;
  389.  
  390.  
  391.  typedef struct tagSQCCOLINFO {
  392.     long    s_flags;        // flag bits
  393.     long    s_prec;            // precision of the column
  394.     long    s_dispwidth;        // display size in bytes
  395.     short    s_icol;            // 1 based column number
  396.     short    s_sqltype;        // SQL data type 
  397.     short    s_scale;        // scale of the column
  398.     short    s_nullable;        // flag for Nullability
  399.     short    s_Ctype;        // C data type for conversion
  400.     short    s_boundcol;        // column number of visual
  401.                     // object if bound (1 based)
  402.                     // 0 means unbound
  403.     char    s_name[32];        // name of the column
  404.     } SQCCOLINFO;
  405.  
  406.  typedef struct tagSQCCURSINFO {
  407.     long    s_flags;        // flag bits
  408.     short    s_ncols;        // number columns
  409.     long    s_rows;            // number of rows. -1 if not known
  410.     long    s_curpos;        // current cursor position ( 1 based)
  411.     long    s_startrow;        // selection range
  412.     long    s_endrow;        // as 1 based  
  413.     short    s_startcol;        // rows and
  414.     short    s_endcol;        // columns
  415.     char    s_name[32];        // cursor name
  416.     char    s_statement[512];    // full table name
  417.     long    s_accessmode;         // accessmode bits
  418.     short    s_cursortype;        // type of cursor
  419.     char    s_dbmsname[32];        // data base name
  420.     } SQCCURSINFO;
  421. //    The selection range is valid of s_startrow is > 0 and rows are 1 based
  422. //     the column numbers are 1 based and refer to the visual object columns
  423.  
  424. //  all prototypes for exported functions  
  425.  
  426.  
  427. #if defined __cplusplus
  428. extern "C" {
  429. #endif
  430.  
  431.     int FAR PASCAL _export    SQcAttachControl(long AppHand,
  432.                     char FAR *szFormname,
  433.                     char FAR *szCtrlname, 
  434.                     short controltype,
  435.                     HANDLE CtrlWnd);
  436.     int FAR PASCAL _export SQcAttachDataBase(long AppHand,
  437.                     char FAR *szDBName,
  438.                     char FAR *szConnectStr, 
  439.                     char FAR *szUID, 
  440.                     char FAR *szPWD, 
  441.                     short connecttype,
  442.                     char FAR *szConnectStrOut,
  443.                     short strsize,
  444.                     void  FAR * FAR *phdbc,
  445.                     HANDLE formwnd);
  446.     int FAR PASCAL _export SQcAttachForm (long AppHand, 
  447.                     char FAR *szFormname, 
  448.                     HANDLE FormWnd);
  449.     int FAR PASCAL  _export SQcBatchEdit(long DsrcHand,
  450.                         char FAR *szIUDstr,
  451.                         short mode);    
  452.     int FAR PASCAL _export SQcBindColumn(long DsrcHand,
  453.                         short col,  // 1 based
  454.                         short sqldatatype,
  455.                         void FAR *buf,
  456.                         long  bufsize,
  457.                         short FAR *flag);
  458.     int FAR PASCAL _export    SQcBindCursor(long DsrcHand,
  459.                     char FAR *szControlNameList);
  460.     int FAR PASCAL _export SQcBindExp(long AppHand,
  461.                     char FAR *szObject,
  462.                     char FAR *szexpstmt);
  463.     int FAR PASCAL _export SQcBindInOut(long AppHand,
  464.                     char FAR *szObjectList,
  465.                     char FAR *szDataSource);
  466.     int FAR PASCAL _export SQcBindTrigger(long DsrcHand,
  467.                     char  FAR *szTriggerstr,
  468.                     char  FAR *modifier,
  469.                     short  mode);
  470.     int FAR PASCAL _export SQcBuild(long DsrcHand,
  471.                     char FAR *szDsrcStmt, 
  472.                     short curstype,
  473.                     char FAR *szDBname,
  474.                     long accessmode 
  475.                     );
  476.     int FAR PASCAL _export    SQcBuildBindExec(long DsrcHand,
  477.                     char FAR *szControlNameList,
  478.                     char FAR *szDsrcStmt,
  479.                     short curstype,
  480.                     long accessmode,
  481.                     char FAR *szDBname);
  482.     int FAR PASCAL _export SQcButtonControl(long DsrcHand,
  483.                     short operation,HWND hwnd);
  484.     int FAR PASCAL _export SQcCheckVersion(short version);
  485.     int FAR PASCAL _export SQcClear(long DsrcHand);
  486.     int FAR PASCAL _export SQcClearForm(long AppHand,
  487.                     char FAR *szFormName);
  488.     int FAR PASCAL _export SQcClose(long DsrcHand);
  489.     int FAR PASCAL _export SQcCloseAndUnbind(long DsrcHand);
  490.     int FAR PASCAL _export SQcCommitWork(long AppHand,
  491.                     char FAR *DBname);
  492.     int FAR PASCAL _export SQcConnect (long FAR *pAppHand, 
  493.                     long FAR *revision);
  494.     int FAR PASCAL _export SQcConvertToMemCursor(long DsrcHand,
  495.                     long FAR *reccount);
  496.     int FAR PASCAL _export SQcCreateDataStream(long AppHand,
  497.                     char FAR *szDsrcName,
  498.                     short DataSrcType,
  499.                     long FAR *pdsrcHand 
  500.                     );
  501.     int FAR PASCAL _export SQcDelete(long DsrcHand);
  502.     int FAR PASCAL _export SQcDeleteDataStream(long DsrcHand);
  503.     int FAR PASCAL _export SQcDeleteRecord(long DsrcHand,long recnum);
  504.     int FAR PASCAL _export    SQcDetachControl(long AppHand,
  505.                     char FAR *szFormname,
  506.                     char FAR *szCtrlname);
  507.     int FAR PASCAL _export SQcDetachDataBase(long AppHand,
  508.                     char FAR *szDBname);
  509.     int FAR PASCAL _export SQcDetachForm (long AppHand, 
  510.                     char FAR *szFormname);
  511.     int FAR PASCAL _export SQcDisconnect (long AppHand);
  512.     int FAR PASCAL _export    SQcExecute(long AppHand,
  513.                     char FAR *szdsrcname,
  514.                     long FAR *pDsrcHand);
  515.     int FAR PASCAL _export SQcFetch(long DsrcHand,long FAR *rowid,
  516.                         long  lparam,
  517.                         short fetchcode);
  518.     int FAR PASCAL _export SQcFormatDate(short format,
  519.                     char FAR *inbuf,
  520.                     char FAR *outbuf,
  521.                     short outbufsize,
  522.                     char FAR *dispdtf, 
  523.                     char FAR *drvdtf);
  524.     long FAR PASCAL _export SQcGetAppHand (void);
  525.     int FAR PASCAL _export SQcGetColInfo(long DsrcHand,
  526.                     SQCCOLINFO FAR *colinfo,short col);
  527.     int FAR PASCAL _export SQcGetCursorInfo(long DsrcHand,
  528.                         SQCCURSINFO FAR *tblinfo);
  529.     int  FAR PASCAL _export SQcGetError(long AppHand,
  530.                      SQCERRINFO FAR *err);
  531.     int  FAR PASCAL _export SQcGetErrorMsg(int errorval,
  532.                      char FAR *errbuf,short bufsize);
  533.     int FAR PASCAL _export    SQcGetHandle(long AppHand,
  534.                     char FAR *szname,
  535.                     long FAR *pHand,
  536.                     short SqcObjType);
  537.     int FAR PASCAL _export SQcGetLrecord(long DsrcHand, 
  538.                     long FAR *plrecord,long precord);
  539.     int FAR PASCAL _export    SQcGetName(long AppHand,
  540.                     char FAR *szname,
  541.                     short namelength,
  542.                     short SqcObjType,
  543.                     long    Key);
  544.     int FAR PASCAL _export SQcGetPrecord(long DsrcHand, 
  545.                     long FAR *pprecord,long lrecord);
  546.     int FAR PASCAL _export SQcGo(long AppHand,short priority);
  547.     int FAR PASCAL _export SQcInsert(long DsrcHand);
  548.     int FAR PASCAL _export SQcInsertRecord(long DsrcHand,
  549.                         long FAR *precnum);
  550.     int FAR PASCAL _export SQcLog (long AppHand,
  551.                     char FAR *filename);
  552.     int FAR PASCAL _export SQcLogRecord(long DsrcHand, long filehandle);
  553.     int FAR PASCAL _export SQcNewRecord(long DsrcHand, long FAR *prow, 
  554.                     long lparam,short mode);
  555.     int FAR PASCAL _export SQcOpen(long DsrcHand,char FAR *actionstr);
  556.     int FAR PASCAL _export SQcQBF(long DsrcHand,char FAR *actionstr,
  557.                         short modifier);
  558.     int FAR PASCAL _export SQcReadPhysicalRecord(long DsrcHand,
  559.                     long recnum,long FAR *recflags);
  560.     int FAR PASCAL _export SQcReadRecord(long DsrcHand,long recnum);
  561.     int FAR PASCAL _export SQcReadColumn(long DsrcHand,
  562.                         long rownum, // 1 based
  563.                         short col,  // 1 based
  564.                         short sqldatatype,
  565.                         void FAR *buf,
  566.                         long  bufsize,
  567.                         short FAR *flag);
  568.     int FAR PASCAL _export SQcRollbackWork(long AppHand,
  569.                         char FAR *DBname);
  570.     int FAR PASCAL _export SQcSetRowFlags(long AppHand,
  571.                            long rownnum,
  572.                            long *rowflags,
  573.                            short flagmask,
  574.                            short flagval);
  575.     int FAR PASCAL _export SQcSetAppMode (long pAppHand, 
  576.                     char FAR *szlog,
  577.                     short mode);
  578.     int FAR PASCAL _export SQcSetDBmode(long pAppHand,
  579.                     char FAR *szDBname,
  580.                     long lmode,
  581.                     void FAR *pparam);
  582.     int FAR PASCAL _export SQcSetColAttr(long DsrcHand,
  583.                     short startcol,        // 1 based
  584.                     char  FAR *colattrstr);
  585.     int FAR PASCAL _export SQcSetColInfo(long DsrcHand,
  586.                     SQCCOLINFO FAR *colinfo,short col);
  587.     int FAR PASCAL _export SQcSetCurrentForm(long AppHand,
  588.                     char FAR *szFormName);
  589.     int FAR PASCAL _export SQcSetCursorInfo(long DsrcHand,
  590.                         SQCCURSINFO FAR *tblinfo);
  591.     int FAR PASCAL _export SQcSetDateFormat(long AppHand,
  592.                     char FAR *szDBname,
  593.                     char FAR *szDisplayFormat,
  594.                     char FAR *szDriverFormat);
  595.     int FAR PASCAL _export SQcSetMaskEditMode(long DsrcHand,
  596.                     short property,
  597.                     short mode);
  598.     int FAR PASCAL _export SQcSetTopRow(long DsrcHand,long recnum);
  599.     int FAR PASCAL _export SQcTrigger(long AppHand,
  600.                     char FAR *szObjname,
  601.                     long    lparam,
  602.                     short triggertype);
  603.     int FAR PASCAL _export SQcUnbindColumns(long DsrcHand);
  604.     int FAR PASCAL _export SQcUpdate(long DsrcHand);
  605.     int FAR PASCAL _export SQcUpdateRecord(long DsrcHand,long recnum);
  606.     int FAR PASCAL _export SQcVerifyHandle(long DsrcHand);
  607.  
  608. #if defined __cplusplus
  609.  }
  610. #endif
  611.  
  612.