home *** CD-ROM | disk | FTP | other *** search
/ Visual Basic 4 Unleashed / Visual_Basic_4_Unleashed_SAMS_Publishing_1995.iso / sfi / vbxctdem / ctconst.bas < prev    next >
Encoding:
BASIC Source File  |  1994-09-14  |  26.5 KB  |  895 lines

  1. Global Const CS_TS_SIZE = 8
  2. Global Const CS_TP_SIZE = 16
  3. Global Const CS_OBJ_NAME = ((CS_MAX_NAME * 3) + 4)
  4. ' Define all the library versions currently supported.
  5.  
  6. Global Const CS_VERSION_100 = 112
  7.  
  8. ' Action flags used.
  9.  
  10. Global Const CS_GET = 33
  11. Global Const CS_SET = 34
  12. Global Const CS_CLEAR = 35
  13. Global Const CS_INIT = 36
  14. Global Const CS_STATUS = 37
  15. Global Const CS_MSGLIMIT = 38
  16. Global Const CS_SEND = 39
  17.  
  18. ' Bind indicator values. These are preferred when passing data into
  19. ' Client Library or Server Library, since they add the appropriate cast.
  20.  
  21. Global Const CS_GOODDATA = 0
  22. Global Const CS_NULLDATA = (-1)
  23.  
  24.   
  25. ' Define ct_debug() operations.
  26.   
  27. Global Const CS_SET_FLAG = 1700
  28. Global Const CS_CLEAR_FLAG = 1701
  29. Global Const CS_SET_DBG_FILE = 1702
  30. Global Const CS_SET_PROTOCOL_FILE = 1703
  31.  
  32.   
  33. ' Define ct_debug() types of trace information.
  34.   
  35. Global Const CS_DBG_ALL = 1
  36. Global Const CS_DBG_ASYNC = 2
  37. Global Const CS_DBG_ERROR = 4
  38. Global Const CS_DBG_MEM = 8
  39. Global Const CS_DBG_PROTOCOL = 16
  40. Global Const CS_DBG_PROTOCOL_STATES = 32
  41. Global Const CS_DBG_API_STATES = 64
  42. Global Const CS_DBG_DIAG = 128
  43. Global Const CS_DBG_NETWORK = 256
  44. Global Const CS_DBG_API_LOGCALL = 512
  45.  
  46.   
  47. 'Cancel types.
  48.   
  49. Global Const CS_CANCEL_CURRENT = 6000
  50. Global Const CS_CANCEL_ALL = 6001
  51. Global Const CS_CANCEL_ATTN = 6002
  52.  
  53.   
  54. ' Cursor fetch options. Currently these are not supported within Open
  55. ' Client and Open Server.
  56.   
  57. Global Const CS_FIRST = 3000
  58. Global Const CS_NEXT = 3001
  59. Global Const CS_PREV = 3002
  60. Global Const CS_LAST = 3003
  61. Global Const CS_ABSOLUTE = 3004
  62. Global Const CS_RELATIVE = 3005
  63.  
  64.   
  65. ' Op codes used in cs_calc().
  66.   
  67. Global Const CS_ADD = 1
  68. Global Const CS_SUB = 2
  69. Global Const CS_MULT = 3
  70. Global Const CS_DIV = 4
  71. Global Const CS_ZERO = 5
  72.  
  73.   
  74. ' The cs_dt_info() types.
  75.   
  76. Global Const CS_MONTH = 7340
  77. Global Const CS_SHORTMONTH = 7341
  78. Global Const CS_DAYNAME = 7342
  79. Global Const CS_DATEORDER = 7343
  80. Global Const CS_12HOUR = 7344
  81. Global Const CS_DT_CONVFMT = 7345
  82.  
  83.   
  84. ' The cs_strcmp() options.
  85.   
  86. Global Const CS_COMPARE = 7440
  87. Global Const CS_SORT = 7441
  88.  
  89.   
  90. ' Callback types.
  91.   
  92. Global Const CS_COMPLETION_CB = 1
  93. Global Const CS_SERVERMSG_CB = 2
  94. Global Const CS_CLIENTMSG_CB = 3
  95. Global Const CS_NOTIF_CB = 4
  96. Global Const CS_ENCRYPT_CB = 5
  97. Global Const CS_CHALLENGE_CB = 6
  98.   
  99. ' To install a signal callback, the type needs to calculated as an
  100. ' offset of the operating-system-specific signal number and the
  101. ' following define. For example, to install a callback handler for a
  102. ' SIGALRM signal, pass (CS_SIGNAL_CB + SIGALRM) to the ct_callback()
  103. ' routine.
  104.   
  105. Global Const CS_SIGNAL_CB = 100
  106.  
  107.   
  108. ' Exit and close flags.
  109.   
  110. Global Const CS_FORCE_EXIT = 300
  111. Global Const CS_FORCE_CLOSE = 301
  112.  
  113.   
  114. ' ct_diag() and cs_diag() type flags.
  115.   
  116. Global Const CS_CLIENTMSG_TYPE = 4700
  117. Global Const CS_SERVERMSG_TYPE = 4701
  118. Global Const CS_ALLMSG_TYPE = 4702
  119. Global Const SQLCA_TYPE = 4703
  120. Global Const SQLCODE_TYPE = 4704
  121. Global Const SQLSTATE_TYPE = 4705
  122.  
  123.   
  124. ' Compute info types.
  125.   
  126. Global Const CS_COMP_OP = 5350
  127. Global Const CS_COMP_ID = 5351
  128. Global Const CS_COMP_COLID = 5352
  129. Global Const CS_COMP_BYLIST = 5353
  130. Global Const CS_BYLIST_LEN = 5354
  131.  
  132.   
  133. ' Compute info operators.
  134.   
  135. Global Const CS_OP_SUM = 5370
  136. Global Const CS_OP_AVG = 5371
  137. Global Const CS_OP_COUNT = 5372
  138. Global Const CS_OP_MIN = 5373
  139. Global Const CS_OP_MAX = 5374
  140.  
  141.   
  142. ' Browse types.
  143.   
  144. Global Const CS_ISBROWSE = 9000
  145. Global Const CS_TABNUM = 9001
  146. Global Const CS_TABNAME = 9002
  147.  
  148.   
  149. ' Result types from ct_results().
  150.   
  151. Global Const CS_ROW_RESULT = 4040
  152. Global Const CS_CURSOR_RESULT = 4041
  153. Global Const CS_PARAM_RESULT = 4042
  154. Global Const CS_STATUS_RESULT = 4043
  155. Global Const CS_MSG_RESULT = 4044
  156. Global Const CS_COMPUTE_RESULT = 4045
  157. Global Const CS_CMD_DONE = 4046
  158. Global Const CS_CMD_SUCCEED = 4047
  159. Global Const CS_CMD_FAIL = 4048
  160. Global Const CS_ROWFMT_RESULT = 4049
  161. Global Const CS_COMPUTEFMT_RESULT = 4050
  162. Global Const CS_DESCRIBE_RESULT = 4051
  163.  
  164.   
  165. ' Flags for getting result info using ct_res_info().
  166.   
  167. Global Const CS_ROW_COUNT = 800
  168. Global Const CS_CMD_NUMBER = 801
  169. Global Const CS_NUM_COMPUTES = 802
  170. Global Const CS_NUMDATA = 803
  171. Global Const CS_ORDERBY_COLS = 804
  172. Global Const CS_NUMORDERCOLS = 805
  173. Global Const CS_MSGTYPE = 806
  174. Global Const CS_BROWSE_INFO = 807
  175. Global Const CS_TRANS_STATE = 808
  176.  
  177.   
  178. ' Possible values for CS_TRANS_STATE.
  179.   
  180. Global Const CS_TRAN_UNDEFINED = 0
  181. Global Const CS_TRAN_IN_PROGRESS = 1
  182. Global Const CS_TRAN_COMPLETED = 2
  183. Global Const CS_TRAN_FAIL = 3
  184. Global Const CS_TRAN_STMT_FAIL = 4
  185.  
  186.   
  187. ' Define the invalid count that the application gets when
  188. ' ct_res_info() is called at the wrong time.
  189.   
  190. Global Const CS_NO_COUNT = -1
  191.  
  192.  
  193. '
  194. ' Commands in Open Client/Server APIs.
  195. '
  196.  
  197.  
  198.   
  199. ' ct_command() command types.
  200.   
  201. Global Const CS_LANG_CMD = 148
  202. Global Const CS_RPC_CMD = 149
  203. Global Const CS_MSG_CMD = 150
  204. Global Const CS_SEND_DATA_CMD = 151
  205. Global Const CS_PACKAGE_CMD = 152
  206. Global Const CS_SEND_BULK_CMD = 153
  207.  
  208.   
  209. ' ct_cursor() command types.
  210.   
  211. Global Const CS_CURSOR_DECLARE = 700
  212. Global Const CS_CURSOR_OPEN = 701
  213. Global Const CS_CURSOR_ROWS = 703
  214. Global Const CS_CURSOR_UPDATE = 704
  215. Global Const CS_CURSOR_DELETE = 705
  216. Global Const CS_CURSOR_CLOSE = 706
  217. Global Const CS_CURSOR_DEALLOC = 707
  218. Global Const CS_CURSOR_OPTION = 725
  219.  
  220.   
  221. ' Open Server-specific cursor command types.
  222.   
  223. Global Const CS_CURSOR_FETCH = 708
  224. Global Const CS_CURSOR_INFO = 709
  225.  
  226.   
  227. ' ct_dyndesc() command types.
  228.   
  229. Global Const CS_ALLOC = 710
  230. Global Const CS_DEALLOC = 711
  231. Global Const CS_USE_DESC = 712
  232. Global Const CS_GETCNT = 713
  233. Global Const CS_SETCNT = 714
  234. Global Const CS_GETATTR = 715
  235. Global Const CS_SETATTR = 716
  236.  
  237.   
  238. ' ct_dynamic() command types.
  239.   
  240. Global Const CS_PREPARE = 717
  241. Global Const CS_EXECUTE = 718
  242. Global Const CS_EXEC_IMMEDIATE = 719
  243. Global Const CS_DESCRIBE_INPUT = 720
  244. Global Const CS_DESCRIBE_OUTPUT = 721
  245. Global Const CS_DYN_CURSOR_DECLARE = 722
  246.  
  247.   
  248. ' Open Server-specific dynamic command types.
  249.   
  250. Global Const CS_PROCNAME = 723
  251. Global Const CS_ACK = 724
  252.  
  253.  
  254.   
  255. ' Command options
  256.   
  257. Global Const CS_RECOMPILE = 188
  258. Global Const CS_NO_RECOMPILE = 189
  259. Global Const CS_BULK_INIT = 190
  260. Global Const CS_BULK_CONT = 191
  261. Global Const CS_BULK_DATA = 192
  262. Global Const CS_COLUMN_DATA = 193
  263.  
  264.   
  265. ' Cursor options.
  266.   
  267. Global Const CS_FOR_UPDATE = 1
  268. Global Const CS_READ_ONLY = 2
  269. Global Const CS_DYNAMIC = 4                 '      Open Server only
  270.  
  271.   
  272. ' Sybase-defined message ids for CS_MSG_CMDs.
  273.   
  274. Global Const CS_MSG_GETLABELS = 6
  275. Global Const CS_MSG_LABELS = 7
  276. Global Const CS_MSG_TABLENAME = 8
  277. Global Const CS_PARSE_TREE = 8710
  278.  
  279.   
  280. ' Minimum and maximum user-defined message id for CS_MSG_CMDs.
  281.   
  282. Global Const CS_USER_MSGID = 32768
  283. Global Const CS_USER_MAX_MSGID = 65535
  284. Global Const CS_MAX_MSG = 1024
  285. Global Const CS_SQLSTATE_SIZE = 8
  286.   
  287. ' Defines for sp_regwatch registered procedure
  288.   
  289. Global Const CS_NOTIFY_ONCE = 2                 '  one-time notification request.
  290. Global Const CS_NOTIFY_ALWAYS = 4               '  permanent notification request.
  291. Global Const CS_NOTIFY_WAIT = 32                '  blocking notification request.
  292. Global Const CS_NOTIFY_NOWAIT = 64              '  non-blocking notification request.
  293.  
  294.  
  295.   
  296. ' Open Client properties.
  297.  
  298.   
  299. ' Properties that are used in *_props() functions.
  300.   
  301. Global Const CS_USERNAME = 9100
  302. Global Const CS_PASSWORD = 9101
  303. Global Const CS_APPNAME = 9102
  304. Global Const CS_HOSTNAME = 9103
  305. Global Const CS_LOGIN_STATUS = 9104
  306. Global Const CS_TDS_VERSION = 9105
  307. Global Const CS_CHARSETCNV = 9106
  308. Global Const CS_PACKETSIZE = 9107
  309. Global Const CS_USERDATA = 9108
  310. Global Const CS_COMMBLOCK = 9109
  311. Global Const CS_NETIO = 9110
  312. Global Const CS_NOINTERRUPT = 9111
  313. Global Const CS_TEXTLIMIT = 9112
  314. Global Const CS_HIDDEN_KEYS = 9113
  315. Global Const CS_VERSION = 9114
  316. Global Const CS_IFILE = 9115
  317. Global Const CS_LOGIN_TIMEOUT = 9116
  318. Global Const CS_TIMEOUT = 9117
  319. Global Const CS_MAX_CONNECT = 9118
  320. Global Const CS_MESSAGE_CB = 9119
  321. Global Const CS_EXPOSE_FMTS = 9120
  322. Global Const CS_EXTRA_INF = 9121
  323. Global Const CS_TRANSACTION_NAME = 9122
  324. Global Const CS_ANSI_BINDS = 9123
  325. Global Const CS_BULK_LOGIN = 9124
  326. Global Const CS_LOC_PROP = 9125
  327. Global Const CS_CUR_STATUS = 9126
  328. Global Const CS_CUR_ID = 9127
  329. Global Const CS_CUR_NAME = 9128
  330. Global Const CS_CUR_ROWCOUNT = 9129
  331. Global Const CS_PARENT_HANDLE = 9130
  332. Global Const CS_EED_CMD = 9131
  333. Global Const CS_DIAG_TIMEOUT = 9132
  334. Global Const CS_DISABLE_POLL = 9133
  335. Global Const CS_NOTIF_CMD = 9134
  336. Global Const CS_SEC_ENCRYPTION = 9135
  337. Global Const CS_SEC_CHALLENGE = 9136
  338. Global Const CS_SEC_NEGOTIATE = 9137
  339. Global Const CS_MEM_POOL = 9138
  340. Global Const CS_USER_ALLOC = 9139
  341. Global Const CS_USER_FREE = 9140
  342. Global Const CS_ENDPOINT = 9141
  343. Global Const CS_NO_TRUNCATE = 9142
  344. Global Const CS_CON_STATUS = 9143
  345. Global Const CS_VER_STRING = 9144
  346. Global Const CS_ASYNC_NOTIFS = 9145
  347. Global Const CS_SERVERNAME = 9146
  348. Global Const CS_THREAD_RESOURCE = 9147
  349. Global Const CS_NOAPI_CHK = 9148
  350. Global Const CS_SEC_APPDEFINED = 9149
  351.  
  352.   
  353. ' Possible values for the CS_NETIO property.
  354.   
  355. Global Const CS_SYNC_IO = 8111
  356. Global Const CS_ASYNC_IO = 8112
  357. Global Const CS_DEFER_IO = 8113
  358.  
  359.   
  360. ' Possible bit values for the CS_LOGIN_STATUS property.
  361.   
  362. Global Const CS_CONSTAT_CONNECTED = 1
  363. Global Const CS_CONSTAT_DEAD = 2
  364.  
  365.  
  366.   
  367. ' Possible bit values for the CS_CUR_STATUS property.
  368.   
  369. Global Const CS_CURSTAT_NONE = 0
  370. Global Const CS_CURSTAT_DECLARED = 1
  371. Global Const CS_CURSTAT_OPEN = 2
  372. Global Const CS_CURSTAT_CLOSED = 4
  373. Global Const CS_CURSTAT_RDONLY = 8
  374. Global Const CS_CURSTAT_UPDATABLE = 16
  375. Global Const CS_CURSTAT_ROWCOUNT = 32
  376. Global Const CS_CURSTAT_DEALLOC = 64
  377.  
  378.  
  379. ' Possible values for the CS_TDS_VERSION property.
  380.  
  381. Global Const CS_TDS_40 = 7360
  382. Global Const CS_TDS_42 = 7361
  383. Global Const CS_TDS_46 = 7362
  384. Global Const CS_TDS_495 = 7363
  385. Global Const CS_TDS_50 = 7364
  386.  
  387.  
  388. '
  389. ' Open Client/Server options.
  390. '
  391.  
  392.  
  393.  
  394. ' The following is the list of all valid options:
  395.  
  396. Global Const CS_OPT_DATEFIRST = 5001            'Set first day of week
  397. Global Const CS_OPT_TEXTSIZE = 5002             'Text size
  398. Global Const CS_OPT_STATS_TIME = 5003           'Server time statistics
  399. Global Const CS_OPT_STATS_IO = 5004             'Server I/O statistics
  400. Global Const CS_OPT_ROWCOUNT = 5005             'Maximum row count
  401. Global Const CS_OPT_NATLANG = 5006              'National Language
  402. Global Const CS_OPT_DATEFORMAT = 5007           'Date format
  403. Global Const CS_OPT_ISOLATION = 5008            'Transaction isolation
  404.                         ' level
  405. Global Const CS_OPT_AUTHON = 5009               'Set authority level on
  406. Global Const CS_OPT_CHARSET = 5010              'Character set
  407. Global Const CS_OPT_SHOWPLAN = 5013             'show execution plan
  408.  
  409. Global Const CS_OPT_NOEXEC = 5014               'don't execute query
  410. Global Const CS_OPT_ARITHIGNORE = 5015          'ignore arithmetic
  411.                         ' exceptions
  412. Global Const CS_OPT_TRUNCIGNORE = 5016          'support ANSI null values
  413. Global Const CS_OPT_ARITHABORT = 5017           'abort on arithmetic
  414.                         ' exceptions
  415. Global Const CS_OPT_PARSEONLY = 5018            'parse only, return error
  416.                         ' msgs
  417. Global Const CS_OPT_GETDATA = 5020              'return trigger data
  418. Global Const CS_OPT_NOCOUNT = 5021              'don't print done count
  419. Global Const CS_OPT_FORCEPLAN = 5023            'force variable substitute
  420.                         ' order
  421. Global Const CS_OPT_FORMATONLY = 5024           'send format w/o row
  422. Global Const CS_OPT_CHAINXACTS = 5025           'chained transaction mode
  423. Global Const CS_OPT_CURCLOSEONXACT = 5026       'close cursor on end trans
  424. Global Const CS_OPT_FIPSFLAG = 5027             'FIPS flag
  425. Global Const CS_OPT_RESTREES = 5028             'return resolution trees
  426. Global Const CS_OPT_IDENTITYON = 5029           'turn on explicit identity
  427. Global Const CS_OPT_CURREAD = 5030              'Set session label
  428.                         ' @@ curread
  429. Global Const CS_OPT_CURWRITE = 5031             'Set session label
  430.                         ' @@curwrite
  431. Global Const CS_OPT_IDENTITYOFF = 5032          'turn off explicit identity
  432. Global Const CS_OPT_AUTHOFF = 5033              'Set authority level off
  433. Global Const CS_OPT_ANSINULL = 5034             'ANSI NULLS behavior
  434. Global Const CS_OPT_QUOTED_IDENT = 5035         'Quoted identifiers
  435. Global Const CS_OPT_ANSIPERM = 5036             'ANSI permission checking
  436. Global Const CS_OPT_STR_RTRUNC = 5037           'ANSI right truncation
  437.  
  438. 'global const CS_MIN_OPTION           CS_OPT_DATEFIRST
  439. 'global const CS_MAX_OPTION           CS_OPT_STR_RTRUNC
  440.  
  441.  
  442. ' The supported options are summarized below with their defined values
  443. ' for `ArgSize' and `OptionArg'. ArgSize specifies the domain of valid
  444. ' values that are allowed.
  445. '
  446. ' Option                       ArgSize         OptionArg
  447. ' ---------------              ---------       ---------
  448. ' CS_OPT_DATEFIRST             1 byte          Defines below
  449. ' CS_OPT_TEXTSIZE              4 bytes         Size in bytes
  450. ' CS_OPT_ROWCOUNT              4 bytes         Number of rows
  451. ' CS_OPT_NATLANG               OptionArg Len   National Lang (string)
  452. ' CS_OPT_DATEFORMAT            1 byte          Defines below
  453. ' CS_OPT_ISOLATION             1 byte          Defines below
  454. ' CS_OPT_AUTHON                OptionArg Len   Table Name (string)
  455. ' CS_OPT_CHARSET               OptionArg Len   Character set (string)
  456. ' CS_OPT_IDENTITYON            OptionArg Len   Table Name (string)
  457. ' CS_OPT_CURREAD               OptionArg Len   Read Label(string)
  458. ' CS_OPT_CURWRITE              OptionArg Len   Write Label(string)
  459. ' CS_OPT_IDENTITYOFF           OptionArg Len   Table Name (string)
  460. ' CS_OPT_AUTHOFF               OptionArg Len   Table Name (string)
  461. ' (All remaining options)      1 byte          Boolean value
  462. '
  463. ' All string values must be sent in 7 bit ASCII.
  464. '
  465.  
  466.  
  467.  
  468.   
  469. Global Const CS_OPT_MONDAY = 1
  470. Global Const CS_OPT_TUESDAY = 2
  471. Global Const CS_OPT_WEDNESDAY = 3
  472. Global Const CS_OPT_THURSDAY = 4
  473. Global Const CS_OPT_FRIDAY = 5
  474. Global Const CS_OPT_SATURDAY = 6
  475. Global Const CS_OPT_SUNDAY = 7
  476.  
  477. '  CS_OPT_DATEFORMAT
  478. Global Const CS_OPT_FMTMDY = 1
  479. Global Const CS_OPT_FMTDMY = 2
  480. Global Const CS_OPT_FMTYMD = 3
  481. Global Const CS_OPT_FMTYDM = 4
  482. Global Const CS_OPT_FMTMYD = 5
  483. Global Const CS_OPT_FMTDYM = 6
  484.  
  485. '  CS_OPT_ISOLATION
  486. Global Const CS_OPT_LEVEL1 = 1
  487. Global Const CS_OPT_LEVEL3 = 3
  488.  
  489.  
  490. '
  491. ' Open Client/Server capabilities.
  492. '
  493.  
  494.  
  495.  
  496. ' Capability types.
  497.  
  498. Global Const CS_CAP_REQUEST = 1
  499. Global Const CS_CAP_RESPONSE = 2
  500.  
  501.  
  502. ' Special capability value to set/get all capability values at once.
  503.  
  504. Global Const CS_ALL_CAPS = 2700
  505.  
  506.  
  507. ' Capability request values.
  508.  
  509. Global Const CS_REQ_LANG = 1
  510. Global Const CS_REQ_RPC = 2
  511. Global Const CS_REQ_NOTIF = 3
  512. Global Const CS_REQ_MSTMT = 4
  513. Global Const CS_REQ_BCP = 5
  514. Global Const CS_REQ_CURSOR = 6
  515. Global Const CS_REQ_DYN = 7
  516. Global Const CS_REQ_MSG = 8
  517. Global Const CS_REQ_PARAM = 9
  518. Global Const CS_DATA_INT1 = 10
  519. Global Const CS_DATA_INT2 = 11
  520. Global Const CS_DATA_INT4 = 12
  521. Global Const CS_DATA_BIT = 13
  522. Global Const CS_DATA_CHAR = 14
  523. Global Const CS_DATA_VCHAR = 15
  524. Global Const CS_DATA_BIN = 16
  525. Global Const CS_DATA_VBIN = 17
  526. Global Const CS_DATA_MNY8 = 18
  527. Global Const CS_DATA_MNY4 = 19
  528. Global Const CS_DATA_DATE8 = 20
  529. Global Const CS_DATA_DATE4 = 21
  530. Global Const CS_DATA_FLT4 = 22
  531. Global Const CS_DATA_FLT8 = 23
  532. Global Const CS_DATA_NUM = 24
  533. Global Const CS_DATA_TEXT = 25
  534. Global Const CS_DATA_IMAGE = 26
  535. Global Const CS_DATA_DEC = 27
  536. Global Const CS_DATA_LCHAR = 28
  537. Global Const CS_DATA_LBIN = 29
  538. Global Const CS_DATA_INTN = 30
  539. Global Const CS_DATA_DATETIMEN = 31
  540. Global Const CS_DATA_MONEYN = 32
  541. Global Const CS_CSR_PREV = 33
  542. Global Const CS_CSR_FIRST = 34
  543. Global Const CS_CSR_LAST = 35
  544. Global Const CS_CSR_ABS = 36
  545. Global Const CS_CSR_REL = 37
  546. Global Const CS_CSR_MULTI = 38
  547. Global Const CS_CON_OOB = 39
  548. Global Const CS_CON_INBAND = 40
  549. Global Const CS_CON_LOGICAL = 41
  550. Global Const CS_PROTO_TEXT = 42
  551. Global Const CS_PROTO_BULK = 43
  552. Global Const CS_REQ_URGNOTIF = 44
  553. Global Const CS_DATA_SENSITIVITY = 45
  554. Global Const CS_DATA_BOUNDARY = 46
  555. Global Const CS_PROTO_DYNAMIC = 47
  556. Global Const CS_PROTO_DYNPROC = 48
  557. Global Const CS_DATA_FLTN = 49
  558. Global Const CS_DATA_BITN = 50
  559. Global Const CS_OPTION_GET = 51
  560. Global Const CS_DATA_INT8 = 52
  561.  
  562.  
  563. ' Minimum and maximum request capability values.
  564.  
  565. 'global const CS_MIN_REQ_CAP          CS_REQ_LANG
  566. 'global const CS_MAX_REQ_CAP          CS_DATA_INT8
  567.  
  568.  
  569. ' Capability response values.
  570.  
  571. Global Const CS_RES_NOMSG = 1
  572. Global Const CS_RES_NOEED = 2
  573. Global Const CS_RES_NOPARAM = 3
  574. Global Const CS_DATA_NOINT1 = 4
  575. Global Const CS_DATA_NOINT2 = 5
  576. Global Const CS_DATA_NOINT4 = 6
  577. Global Const CS_DATA_NOBIT = 7
  578. Global Const CS_DATA_NOCHAR = 8
  579. Global Const CS_DATA_NOVCHAR = 9
  580. Global Const CS_DATA_NOBIN = 10
  581. Global Const CS_DATA_NOVBIN = 11
  582. Global Const CS_DATA_NOMNY8 = 12
  583. Global Const CS_DATA_NOMNY4 = 13
  584. Global Const CS_DATA_NODATE8 = 14
  585. Global Const CS_DATA_NODATE4 = 15
  586. Global Const CS_DATA_NOFLT4 = 16
  587. Global Const CS_DATA_NOFLT8 = 17
  588. Global Const CS_DATA_NONUM = 18
  589. Global Const CS_DATA_NOTEXT = 19
  590. Global Const CS_DATA_NOIMAGE = 20
  591. Global Const CS_DATA_NODEC = 21
  592. Global Const CS_DATA_NOLCHAR = 22
  593. Global Const CS_DATA_NOLBIN = 23
  594. Global Const CS_DATA_NOINTN = 24
  595. Global Const CS_DATA_NODATETIMEN = 25
  596. Global Const CS_DATA_NOMONEYN = 26
  597. Global Const CS_CON_NOOOB = 27
  598. Global Const CS_CON_NOINBAND = 28
  599. Global Const CS_PROTO_NOTEXT = 29
  600. Global Const CS_PROTO_NOBULK = 30
  601. Global Const CS_DATA_NOSENSITIVITY = 31
  602. Global Const CS_DATA_NOBOUNDARY = 32
  603. Global Const CS_RES_NOTDSDEBUG = 33
  604. Global Const CS_RES_NOSTRIPBLANKS = 34
  605. Global Const CS_DATA_NOINT8 = 35
  606.  
  607.  
  608. ' Minimum and maximum response capability values.
  609.  
  610. 'global const CS_MIN_RES_CAP          CS_RES_NOMSG
  611. 'global const CS_MAX_RES_CAP          CS_DATA_NOINT8
  612.  
  613.  
  614. ' Minimum and maximum of all capabilities defined above.
  615.  
  616. 'global const CS_MIN_CAPVALUE         CS_REQ_LANG
  617. 'global const CS_MAX_CAPVALUE         CS_DATA_INT8
  618.  
  619.  
  620. ' Size of area to store capabilities. The array len must be greater than
  621. ' ((CS_CAP_MAX / CS_BITS_PER_BYTE) + 1). The current value allows
  622. ' additional capabilities to be added.
  623.  
  624. Global Const CS_CAP_ARRAYLEN = 16
  625.  
  626.  
  627.  
  628. ' Data structure defining storage for capabilities.
  629.  
  630. 'typedef struct _cs_cap_type
  631. '{
  632. '        CS_BYTE         mask[CS_CAP_ARRAYLEN];
  633. '} CS_CAP_TYPE;
  634.  
  635.  
  636.  
  637. '
  638. ' Defines used in Open Client/Server structures.
  639. '
  640.  
  641.  
  642.  
  643. ' Define I/O types in the CS_IODESC structure.
  644.  
  645. Global Const CS_IODATA = 1600
  646.  
  647.  
  648. ' Define status values for the status field of the CS_SERVERMSG and
  649. ' CS_CLIENTMSG structures.
  650.  
  651. Global Const CS_HASEED = 1
  652. Global Const CS_FIRST_CHUNK = 2
  653. Global Const CS_LAST_CHUNK = 4
  654.  
  655.  
  656. ''''''''''''''''''''''''''''''''''''''
  657. '
  658. ' User-accessible information structures.
  659. '
  660. ''''''''''''''''''''''''''''''''''''''
  661.  
  662.  
  663. ' Define the I/O descriptor structure used by Open Client/Server.
  664. '
  665. ' iotype               Indicates the type of I/O to perform. For text
  666. '                      and image operations, iotype always has the
  667. '                      value CS_IODATA.
  668. '
  669. ' datatype             The datatype of the data object. The only legal
  670. '                      values for datatype are CS_TEXT_TYPE and
  671. '                      CS_IMAGE_TYPE.
  672. '
  673. ' *locale              A pointer to a CS_LOCALE structure containing
  674. '                      localization information for the text or image
  675. '                      value. Set locale to NULL if localization
  676. '                      information is not required.
  677. '
  678. ' usertype             The SQL Server user-defined datatype of the data
  679. '                      object, if any.
  680. '
  681. ' total_txtlen         The total length, in bytes, of the text or image
  682. '                      value.
  683. '
  684. ' offset               Reserved for future use.
  685. '
  686. ' log_on_update        Whether the update for this text object should
  687. '                      be logged or not.
  688. '
  689. ' name                 The name of the text or image column. name is a
  690. '                      string of the form table.column.
  691. '
  692. ' namelen              The actual length of name
  693. '
  694. ' timestamp            The text timestamp of the column. A text
  695. '                      timestamp marks the time of a text or image
  696. '                      column's last modification.
  697. '
  698. ' timestamplen         The length, in bytes, of timestamp.
  699. '
  700. ' textptr              The text pointer for the column. A text pointer
  701. '                      is an internal server pointer that points to the
  702. '                      data for a text or image column. textptr identifies
  703. '                      the target column in a send-data operation.
  704. '
  705. ' textptrlen           The length, in bytes, of textptr.
  706.  
  707.  
  708. 'typedef struct _cs_iodesc
  709. '{
  710. '       CS_INT          iotype;
  711. '       CS_INT          datatype;
  712. '       CS_LOCALE       *locale;
  713. '       CS_INT          usertype;
  714. '       CS_INT          total_txtlen;
  715. '       CS_INT          offset;
  716. '       CS_BOOL         log_on_update;
  717. '       CS_CHAR         name[CS_OBJ_NAME];
  718. '       CS_INT          namelen;
  719. '       CS_BYTE         timestamp[CS_TS_SIZE];
  720. '       CS_INT          timestamplen;
  721. '       CS_BYTE         textptr[CS_TP_SIZE];
  722. '       CS_INT          textptrlen;
  723. '} CS_IODESC;
  724.  
  725. Type CS_IODESC
  726.     iotype As Long
  727.     datatype As Long
  728.     locale As Long
  729.     usertype As Long
  730.     total_txtlen As Long
  731.     log_on_update As Long
  732.     nam As String * CS_OBJ_NAME
  733.     namelen As Long
  734.     timestamp As String * CS_TS_SIZE
  735.     timestamplen As Long
  736.     textptr As String * CS_TP_SIZE
  737.     textptrlen As Long
  738. End Type
  739.  
  740. ' Define the browse descriptor structure used by Open Client/Server.
  741. '
  742. ' status               A bit mask of either CS_EXPRESSION and/or CS_RENAMED.
  743. '
  744. ' isbrowse             CS_TRUE the column can be browse-mode updated.
  745. '
  746. ' origname             The original name of the column in the database.
  747. '
  748. ' orignlen             Length of origname in bytes.
  749. '
  750. ' tablenum             The number of the table to which the column
  751. '                      belongs. The first table in a select statement's
  752. '                      from-list is table number 1, the second number 2,
  753. '                      and so forth.
  754. '
  755. ' tablename            The name of the table to which the column belongs.
  756. '
  757. ' tabnlen              Length of tablename in bytes.
  758. '
  759.  
  760. 'typedef struct _cs_browsedesc
  761. '{
  762. '       CS_INT          status;
  763. '       CS_BOOL         isbrowse;
  764. '       CS_CHAR         origname[CS_MAX_NAME];
  765. '       CS_INT          orignlen;
  766. '       CS_INT          tablenum;
  767. '       CS_CHAR         tablename[CS_OBJ_NAME];
  768. '       CS_INT          tabnlen;
  769. '} CS_BROWSEDESC;
  770.  
  771.  
  772.  
  773. ' Define the server message structure used by Open Client/Server.
  774. '
  775. ' msgnumber            The server message number.
  776. '
  777. ' state                The server error state.
  778. '
  779. ' severity             The severity of the message.
  780. '
  781. ' text                 The text of the error string. If an application
  782. '                      is not sequencing messages, text is guaranteed
  783. '                      to be null-terminated, even if it has been
  784. '                      truncated. If an application is sequencing
  785. '                      messages, text is null-terminated only if it is
  786. '                      the last chunk of a sequenced message.
  787. '
  788. ' textlen              The length, in bytes, of text.
  789. '
  790. ' svrname              The name of the server that generated the message.
  791. '
  792. ' svrnlen              The length, in bytes, of svrname.
  793. '
  794. ' proc                 The name of the stored procedure which caused
  795. '                      the message, if any.
  796. '
  797. ' proclen              The length, in bytes, of proc.
  798. '
  799. ' line                 The line number, if any, of the line that caused
  800. '                      the message. line can be a line number in a
  801. '                      stored procedure or a line number in a command
  802. '                      batch.
  803. '
  804. ' status               A bitmask used to indicate various types of
  805. '                      information, such as whether or not extended
  806. '                      error data is included with the message.
  807. '
  808. ' sqlstate             SQL state information.
  809. '
  810. ' sqlstatelen          The length, in bytes, of sqlstate.
  811. '
  812.  
  813. 'typedef struct _cs_servermsg
  814. '{
  815. Type CS_SERVERMSG
  816.     msgnumber As Long
  817.     state As Long
  818.     severity As Long
  819.     text As String * CS_MAX_MSG
  820.     textlen As Long
  821.     svrname As String * CS_MAX_NAME
  822.     svrnlen As Long
  823.     proc As String * CS_MAX_NAME
  824.     proclen As Long
  825.     line As Long
  826.     status As Long
  827.     sqlstate As String * CS_SQLSTATE_SIZE
  828.     sqlstatelen As Long
  829. End Type
  830. '} CS_SERVERMSG;
  831.  
  832.  
  833. ' Define the client message structure used by Open Client/Server.
  834. '
  835. ' severity             A symbolic value representing the severity of
  836. '                      the message.
  837. '
  838. ' msgnumber            The message number. For information on how to
  839. '                      interpret this number in Client-Library
  840. '                      applications, see the Client-Library Messages
  841. '                      topics in the Open Client documentation.
  842. '
  843. ' msgstring            The message string. If an application is not
  844. '                      sequencing messages, msgstring is guaranteed to
  845. '                      be null-terminated, even if it has been truncated.
  846. '                      If an application is sequencing messages,
  847. '                      msgstring is null-terminated only if it is the
  848. '                      last chunk of a sequenced message.
  849. '
  850. ' msgstringlen         The length, in bytes, of msgstring.
  851. '
  852. ' osnumber             An error may have involved interactions the
  853. '                      operating system (OS). If so, the OS error
  854. '                      number would be stored here. Otherwise,
  855. '                      this will be zero.
  856. '
  857. ' osstring             The operating system error text (if any).
  858. '
  859. ' osstringlen          The length, in bytes, of osstring.
  860. '
  861. ' status               A bitmask used to indicate various types of
  862. '                      information, such as whether or not this is the
  863. '                      first, a middle, or the last chunk of an error
  864. '                      message.
  865. '
  866. ' sqlstate             SQL state information.
  867. '
  868. ' sqlstatelen          The length, in bytes, of sqlstate.
  869. '
  870.  
  871. 'typedef struct _cs_clientmsg
  872. '{
  873. Type CS_CLIENTMSG
  874.     severity As Long
  875.     msgnumber As Long
  876.     msgstring As String * 1024
  877.     msgstringlen As Long
  878.     osnumber As Long
  879.     osstring As String * 1024
  880.     osstringlen As Long
  881.     status As Long
  882.     sqlstate As String * 8
  883.     sqlstatelen As Long
  884. End Type
  885. '} CS_CLIENTMSG;
  886.  
  887.  
  888. '
  889. ' Define user-accessable functions for Client/Server Library here.
  890. '
  891.  
  892.  
  893.  
  894.  
  895.