ibase60.pp 80 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233
  1. {
  2. $Id$
  3. }
  4. unit ibase60;
  5. {$MODE objfpc}
  6. {$MACRO on}
  7. interface
  8. {$IFDEF Unix}
  9. {$LINKLIB c}
  10. {$DEFINE gdsdecl:=cdecl}
  11. const
  12. gdslib = 'gds';
  13. {$ENDIF}
  14. {$IFDEF Win32}
  15. {$DEFINE gdsdecl:=stdcall}
  16. const
  17. gdslib = 'gds32.dll';
  18. {$ENDIF}
  19. type
  20. { Unsigned types }
  21. UChar = Byte;
  22. UShort = Word;
  23. UInt = DWord;
  24. ULong = DWord;
  25. { Signed types }
  26. Int = LongInt;
  27. Long = LongInt;
  28. Short = Integer;
  29. Float = Single;
  30. { Pointers to basic types }
  31. PByte = ^Byte;
  32. PInt = ^Int;
  33. PShort = ^Short;
  34. PUShort = ^UShort;
  35. PLong = ^Long;
  36. PULong = ^ULong;
  37. PFloat = ^Float;
  38. PUChar = ^UChar;
  39. PVoid = ^Pointer;
  40. PSmallint = ^Smallint;
  41. PWOrd = ^Word;
  42. {$PACKRECORDS C}
  43. const
  44. ISC_TRUE = 1;
  45. ISC_FALSE = 0;
  46. const
  47. ISC__TRUE = ISC_TRUE;
  48. ISC__FALSE = ISC_FALSE;
  49. Type
  50. ISC_USHORT = word;
  51. ISC_STATUS = longint;
  52. ISC_INT64 = int64;
  53. ISC_UINT64 = qword;
  54. ISC_LONG = Longint;
  55. PISC_USHORT = ^ISC_USHORT;
  56. PISC_STATUS = ^ISC_STATUS;
  57. PPISC_STATUS = ^PISC_STATUS;
  58. PISC_INT64 = ^ISC_INT64;
  59. PISC_UINT64 = ^ISC_UINT64;
  60. PISC_LONG = ^ISC_LONG;
  61. const
  62. DSQL_close = 1;
  63. DSQL_drop = 2;
  64. {!!MVC
  65. Removed all ISC_FAR, ISC_EXPORT_VARARG and ISC_EXPORT
  66. macros.
  67. They confuse h2pas...
  68. !!MVC }
  69. { }
  70. { Time & Date Support }
  71. { }
  72. {$ifndef _ISC_TIMESTAMP_}
  73. type
  74. ISC_DATE = longint;
  75. ISC_TIME = dword;
  76. ISC_TIMESTAMP = record
  77. timestamp_date : ISC_DATE;
  78. timestamp_time : ISC_TIME;
  79. end;
  80. TISC_DATE = ISC_DATE;
  81. TISC_TIME = ISC_TIME;
  82. TISC_TIMESTAMP = ISC_TIMESTAMP;
  83. PISC_DATE = ^ISC_DATE;
  84. PISC_TIME = ^ISC_TIME;
  85. PISC_TIMESTAMP = ^ISC_TIMESTAMP;
  86. const
  87. _ISC_TIMESTAMP_ = 1;
  88. {$endif}
  89. const
  90. ISC_TIME_SECONDS_PRECISION = 10000;
  91. ISC_TIME_SECONDS_PRECISION_SCALE = -4;
  92. { }
  93. { Blob id structure }
  94. { }
  95. Type
  96. GDS_QUAD = record
  97. gds_quad_high : ISC_LONG;
  98. gds_quad_low : ISC_LONG;
  99. end;
  100. TGDS_QUAD = GDS_QUAD;
  101. PGDS_QUAD = ^GDS_QUAD;
  102. Type
  103. ISC_QUAD = GDS_QUAD;
  104. TISC_QUAD = ISC_QUAD;
  105. PISC_QUAD = ^ISC_QUAD;
  106. { !!field redefinitions !!
  107. isc_quad_high = gds_quad_high;
  108. isc_quad_low = gds_quad_low;
  109. }
  110. type
  111. ISC_ARRAY_BOUND = record
  112. array_bound_lower : smallint;
  113. array_bound_upper : smallint;
  114. end;
  115. TISC_ARRAY_BOUND = ISC_ARRAY_BOUND;
  116. PISC_ARRAY_BOUND = ^ISC_ARRAY_BOUND;
  117. ISC_ARRAY_DESC = record
  118. array_desc_dtype : byte;
  119. array_desc_scale : char;
  120. array_desc_length : word;
  121. array_desc_field_name : array[0..31] of char;
  122. array_desc_relation_name : array[0..31] of char;
  123. array_desc_dimensions : smallint;
  124. array_desc_flags : smallint;
  125. array_desc_bounds : array[0..15] of ISC_ARRAY_BOUND;
  126. end;
  127. TISC_ARRAY_DESC = ISC_ARRAY_DESC;
  128. PISC_ARRAY_DESC = ^ISC_ARRAY_DESC;
  129. ISC_BLOB_DESC = record
  130. blob_desc_subtype : smallint;
  131. blob_desc_charset : smallint;
  132. blob_desc_segment_size : smallint;
  133. blob_desc_field_name : array[0..31] of byte;
  134. blob_desc_relation_name : array[0..31] of byte;
  135. end;
  136. TISC_BLOB_DESC = ISC_BLOB_DESC;
  137. PISC_BLOB_DESC = ^ISC_BLOB_DESC ;
  138. { }
  139. { Blob control structure }
  140. { }
  141. {!!MVC
  142. !!MVC }
  143. { Source filter }
  144. {!!MVC
  145. !!MVC }
  146. { Argument to pass to source }
  147. { filter }
  148. { Target type }
  149. { Source type }
  150. { Length of buffer }
  151. { Length of current segment }
  152. { Length of blob parameter }
  153. { block }
  154. { Address of blob parameter }
  155. { block }
  156. { Address of segment buffer }
  157. { Length of longest segment }
  158. { Total number of segments }
  159. { Total length of blob }
  160. { Address of status vector }
  161. { Application specific data }
  162. TCTLSourceFunction = function : isc_long;
  163. PISC_BLOB_CTL = ^ISC_BLOB_CTL ;
  164. ISC_BLOB_CTL = record
  165. ctl_source : TCTLSourceFunction; // was ISC_STATUS ( *ctl_source)();
  166. ctl_source_handle : pisc_blob_ctl ; // was struct isc_blob_ctl * ctl_source_handle;
  167. ctl_to_sub_type : smallint;
  168. ctl_from_sub_type : smallint;
  169. ctl_buffer_length : word;
  170. ctl_segment_length : word;
  171. ctl_bpb_length : word;
  172. ctl_bpb : Pchar;
  173. ctl_buffer : Pbyte;
  174. ctl_max_segment : ISC_LONG;
  175. ctl_number_segments : ISC_LONG;
  176. ctl_total_length : ISC_LONG;
  177. ctl_status : PISC_STATUS;
  178. ctl_data : array[0..7] of longint;
  179. end;
  180. TISC_BLOB_CTL = ISC_BLOB_CTL;
  181. { }
  182. { Blob stream definitions }
  183. { }
  184. { Blob handle }
  185. { Address of buffer }
  186. { Next character }
  187. { Length of buffer }
  188. { Characters in buffer }
  189. { (mode) ? OUTPUT : INPUT }
  190. BSTREAM = record
  191. bstr_blob : pointer;
  192. bstr_buffer : Pchar;
  193. bstr_ptr : Pchar;
  194. bstr_length : smallint;
  195. bstr_cnt : smallint;
  196. bstr_mode : char;
  197. end;
  198. TBSTREAM = BSTREAM;
  199. PBstream = ^BSTREAM;
  200. {!!MVC
  201. #define getb(p) (--(p)->bstr_cnt >= 0 ? (p)->bstr_ptr++ & 0377: BLOB_get (p))
  202. #define putb(x,p) (((x) == '\n' || (!(--(p)->bstr_cnt))) ? BLOB_put ((x),p) : ((int) ( (p)->bstr_ptr++ = (unsigned) (x))))
  203. #define putbx(x,p) ((!(--(p)->bstr_cnt)) ? BLOB_put ((x),p) : ((int) ( (p)->bstr_ptr++ = (unsigned) (x))))
  204. !!MVC }
  205. { }
  206. { Dynamic SQL definitions }
  207. { }
  208. { }
  209. { Declare the extended SQLDA }
  210. { }
  211. { datatype of field }
  212. { scale factor }
  213. { datatype subtype - BLOBs & Text }
  214. { types only }
  215. { length of data area }
  216. { address of data }
  217. { address of indicator variable }
  218. { length of sqlname field }
  219. { name of field, name length + space }
  220. { for NULL }
  221. { length of relation name }
  222. { field's relation name + space for }
  223. { NULL }
  224. { length of owner name }
  225. { relation's owner name + space for }
  226. { NULL }
  227. { length of alias name }
  228. { relation's alias name + space for }
  229. { NULL }
  230. XSQLVAR = record
  231. sqltype : smallint;
  232. sqlscale : smallint;
  233. sqlsubtype : smallint;
  234. sqllen : smallint;
  235. sqldata : Pchar;
  236. sqlind : Psmallint;
  237. sqlname_length : smallint;
  238. sqlname : array[0..31] of char;
  239. relname_length : smallint;
  240. relname : array[0..31] of char;
  241. ownname_length : smallint;
  242. ownname : array[0..31] of char;
  243. aliasname_length : smallint;
  244. aliasname : array[0..31] of char;
  245. end;
  246. TXSQLVAR = XSQLVAR;
  247. PXSQLVAR =^XSQLVAR;
  248. { version of this XSQLDA }
  249. { XSQLDA name field }
  250. { length in bytes of SQLDA }
  251. { number of fields allocated }
  252. { actual number of fields }
  253. { first field address }
  254. XSQLDA = record
  255. version : smallint;
  256. sqldaid : array[0..7] of char;
  257. sqldabc : ISC_LONG;
  258. sqln : smallint;
  259. sqld : smallint;
  260. sqlvar : array[0..0] of XSQLVAR;
  261. end;
  262. TXSQLDA = XSQLDA;
  263. PXSQLDA =^XSQLDA;
  264. function XSQLDA_LENGTH(n: Integer): Integer;
  265. const
  266. SQLDA_VERSION1 = 1;
  267. { meaning is same as DIALECT_xsqlda }
  268. SQL_DIALECT_V5 = 1;
  269. { flagging anything that is delimited
  270. by double quotes as an error and
  271. flagging keyword DATE as an error }
  272. SQL_DIALECT_V6_TRANSITION = 2;
  273. { supports SQL delimited identifier,
  274. SQLDATE/DATE, TIME, TIMESTAMP,
  275. CURRENT_DATE, CURRENT_TIME,
  276. CURRENT_TIMESTAMP, and 64-bit exact
  277. numeric type }
  278. SQL_DIALECT_V6 = 3;
  279. { latest IB DIALECT }
  280. SQL_DIALECT_CURRENT = SQL_DIALECT_V6;
  281. { }
  282. { InterBase Handle Definitions }
  283. { }
  284. type
  285. isc_att_handle = pointer;
  286. isc_blob_handle = pointer;
  287. isc_db_handle = pointer;
  288. isc_form_handle = pointer;
  289. isc_req_handle = pointer;
  290. isc_stmt_handle = pointer;
  291. isc_svc_handle = pointer;
  292. isc_tr_handle = pointer;
  293. isc_win_handle = pointer;
  294. isc_callback = procedure ;gdsdecl;
  295. isc_resv_handle = ISC_LONG;
  296. tisc_att_handle = isc_att_handle;
  297. tisc_blob_handle = isc_blob_handle;
  298. tisc_db_handle = isc_db_handle;
  299. tisc_form_handle = isc_form_handle;
  300. tisc_req_handle = isc_req_handle;
  301. tisc_stmt_handle = isc_stmt_handle;
  302. tisc_svc_handle = isc_svc_handle;
  303. tisc_tr_handle = isc_tr_handle;
  304. tisc_win_handle = isc_win_handle;
  305. tisc_callback = isc_callback;
  306. tisc_resv_handle = isc_resv_handle;
  307. pisc_att_handle =^isc_att_handle ;
  308. pisc_blob_handle =^isc_blob_handle ;
  309. pisc_db_handle =^isc_db_handle ;
  310. pisc_form_handle =^isc_form_handle ;
  311. pisc_req_handle =^isc_req_handle ;
  312. pisc_stmt_handle =^isc_stmt_handle ;
  313. pisc_svc_handle =^isc_svc_handle ;
  314. pisc_tr_handle =^isc_tr_handle ;
  315. pisc_win_handle =^isc_win_handle ;
  316. pisc_callback = ^isc_callback;
  317. pisc_resv_handle =^isc_resv_handle ;
  318. { }
  319. { OSRI database functions }
  320. { }
  321. function isc_attach_database(_para1:PISC_STATUS; _para2:smallint; _para3:Pchar; _para4:Pisc_db_handle; _para5:smallint;
  322. _para6:Pchar):ISC_STATUS; gdsdecl; external gdslib;
  323. function isc_array_gen_sdl(_para1:PISC_STATUS; _para2:PISC_ARRAY_DESC; _para3:Psmallint; _para4:Pchar; _para5:Psmallint):ISC_STATUS; gdsdecl; external gdslib;
  324. function isc_array_get_slice(_para1:PISC_STATUS; _para2:Pisc_db_handle; _para3:Pisc_tr_handle; _para4:PISC_QUAD; _para5:PISC_ARRAY_DESC;
  325. _para6:pointer; _para7:PISC_LONG):ISC_STATUS; gdsdecl; external gdslib;
  326. function isc_array_lookup_bounds(_para1:PISC_STATUS; _para2:Pisc_db_handle; _para3:Pisc_tr_handle; _para4:Pchar; _para5:Pchar;
  327. _para6:PISC_ARRAY_DESC):ISC_STATUS; gdsdecl; external gdslib;
  328. function isc_array_lookup_desc(_para1:PISC_STATUS; _para2:Pisc_db_handle; _para3:Pisc_tr_handle; _para4:Pchar; _para5:Pchar;
  329. _para6:PISC_ARRAY_DESC):ISC_STATUS; gdsdecl; external gdslib;
  330. function isc_array_set_desc(_para1:PISC_STATUS; _para2:Pchar; _para3:Pchar; _para4:Psmallint; _para5:Psmallint;
  331. _para6:Psmallint; _para7:PISC_ARRAY_DESC):ISC_STATUS; gdsdecl; external gdslib;
  332. function isc_array_put_slice(_para1:PISC_STATUS; _para2:Pisc_db_handle; _para3:Pisc_tr_handle; _para4:PISC_QUAD; _para5:PISC_ARRAY_DESC;
  333. _para6:pointer; _para7:PISC_LONG):ISC_STATUS; gdsdecl; external gdslib;
  334. procedure isc_blob_default_desc(_para1:PISC_BLOB_DESC; _para2:Pbyte; _para3:Pbyte); gdsdecl; external gdslib;
  335. function isc_blob_gen_bpb(_para1:PISC_STATUS; _para2:PISC_BLOB_DESC; _para3:PISC_BLOB_DESC; _para4:word; _para5:Pbyte;
  336. _para6:Pword):ISC_STATUS; gdsdecl; external gdslib;
  337. function isc_blob_info(_para1:PISC_STATUS; _para2:Pisc_blob_handle; _para3:smallint; _para4:Pchar; _para5:smallint;
  338. _para6:Pchar):ISC_STATUS; gdsdecl; external gdslib;
  339. function isc_blob_lookup_desc(_para1:PISC_STATUS; _para2:Pisc_db_handle; _para3:Pisc_tr_handle; _para4:Pbyte; _para5:Pbyte;
  340. _para6:PISC_BLOB_DESC; _para7:Pbyte):ISC_STATUS; gdsdecl; external gdslib;
  341. function isc_blob_set_desc(_para1:PISC_STATUS; _para2:Pbyte; _para3:Pbyte; _para4:smallint; _para5:smallint;
  342. _para6:smallint; _para7:PISC_BLOB_DESC):ISC_STATUS; gdsdecl; external gdslib;
  343. function isc_cancel_blob(_para1:PISC_STATUS; _para2:Pisc_blob_handle):ISC_STATUS; gdsdecl; external gdslib;
  344. function isc_cancel_events(_para1:PISC_STATUS; _para2:Pisc_db_handle; _para3:PISC_LONG):ISC_STATUS; gdsdecl; external gdslib;
  345. function isc_close_blob(_para1:PISC_STATUS; _para2:Pisc_blob_handle):ISC_STATUS; gdsdecl; external gdslib;
  346. function isc_commit_retaining(_para1:PISC_STATUS; _para2:Pisc_tr_handle):ISC_STATUS; gdsdecl; external gdslib;
  347. function isc_commit_transaction(_para1:PISC_STATUS; _para2:Pisc_tr_handle):ISC_STATUS; gdsdecl; external gdslib;
  348. function isc_create_blob(_para1:PISC_STATUS; _para2:Pisc_db_handle; _para3:Pisc_tr_handle; _para4:Pisc_blob_handle; _para5:PISC_QUAD):ISC_STATUS; gdsdecl; external gdslib;
  349. function isc_create_blob2(_para1:PISC_STATUS; _para2:Pisc_db_handle; _para3:Pisc_tr_handle; _para4:Pisc_blob_handle; _para5:PISC_QUAD;
  350. _para6:smallint; _para7:Pchar):ISC_STATUS; gdsdecl; external gdslib;
  351. function isc_create_database(_para1:PISC_STATUS; _para2:smallint; _para3:Pchar; _para4:Pisc_db_handle; _para5:smallint;
  352. _para6:Pchar; _para7:smallint):ISC_STATUS; gdsdecl; external gdslib;
  353. function isc_database_info(_para1:PISC_STATUS; _para2:Pisc_db_handle; _para3:smallint; _para4:Pchar; _para5:smallint;
  354. _para6:Pchar):ISC_STATUS; gdsdecl; external gdslib;
  355. procedure isc_decode_date(_para1:PISC_QUAD; _para2:pointer); gdsdecl; external gdslib;
  356. procedure isc_decode_sql_date(_para1:PISC_DATE; _para2:pointer); gdsdecl; external gdslib;
  357. procedure isc_decode_sql_time(_para1:PISC_TIME; _para2:pointer); gdsdecl; external gdslib;
  358. procedure isc_decode_timestamp(_para1:PISC_TIMESTAMP; _para2:pointer); gdsdecl; external gdslib;
  359. function isc_detach_database(_para1:PISC_STATUS; _para2:Pisc_db_handle):ISC_STATUS; gdsdecl; external gdslib;
  360. function isc_drop_database(_para1:PISC_STATUS; _para2:Pisc_db_handle):ISC_STATUS; gdsdecl; external gdslib;
  361. function isc_dsql_allocate_statement(_para1:PISC_STATUS; _para2:Pisc_db_handle; _para3:Pisc_stmt_handle):ISC_STATUS; gdsdecl; external gdslib;
  362. function isc_dsql_alloc_statement2(_para1:PISC_STATUS; _para2:Pisc_db_handle; _para3:Pisc_stmt_handle):ISC_STATUS; gdsdecl; external gdslib;
  363. function isc_dsql_describe(_para1:PISC_STATUS; _para2:Pisc_stmt_handle; _para3:word; _para4:PXSQLDA):ISC_STATUS; gdsdecl; external gdslib;
  364. function isc_dsql_describe_bind(_para1:PISC_STATUS; _para2:Pisc_stmt_handle; _para3:word; _para4:PXSQLDA):ISC_STATUS; gdsdecl; external gdslib;
  365. function isc_dsql_exec_immed2(_para1:PISC_STATUS; _para2:Pisc_db_handle; _para3:Pisc_tr_handle; _para4:word; _para5:Pchar;
  366. _para6:word; _para7:PXSQLDA; _para8:PXSQLDA):ISC_STATUS; gdsdecl; external gdslib;
  367. function isc_dsql_execute(_para1:PISC_STATUS; _para2:Pisc_tr_handle; _para3:Pisc_stmt_handle; _para4:word; _para5:PXSQLDA):ISC_STATUS; gdsdecl; external gdslib;
  368. function isc_dsql_execute2(_para1:PISC_STATUS; _para2:Pisc_tr_handle; _para3:Pisc_stmt_handle; _para4:word; _para5:PXSQLDA;
  369. _para6:PXSQLDA):ISC_STATUS; gdsdecl; external gdslib;
  370. function isc_dsql_execute_immediate(_para1:PISC_STATUS; _para2:Pisc_db_handle; _para3:Pisc_tr_handle; _para4:word; _para5:Pchar;
  371. _para6:word; _para7:PXSQLDA):ISC_STATUS; gdsdecl; external gdslib;
  372. function isc_dsql_fetch(_para1:PISC_STATUS; _para2:Pisc_stmt_handle; _para3:word; _para4:PXSQLDA):ISC_STATUS; gdsdecl; external gdslib;
  373. function isc_dsql_finish(_para1:Pisc_db_handle):ISC_STATUS; gdsdecl; external gdslib;
  374. function isc_dsql_free_statement(_para1:PISC_STATUS; _para2:Pisc_stmt_handle; _para3:word):ISC_STATUS; gdsdecl; external gdslib;
  375. function isc_dsql_insert(_para1:PISC_STATUS; _para2:Pisc_stmt_handle; _para3:word; _para4:PXSQLDA):ISC_STATUS; gdsdecl; external gdslib;
  376. function isc_dsql_prepare(_para1:PISC_STATUS; _para2:Pisc_tr_handle; _para3:Pisc_stmt_handle; _para4:word; _para5:Pchar;
  377. _para6:word; _para7:PXSQLDA):ISC_STATUS; gdsdecl; external gdslib;
  378. function isc_dsql_set_cursor_name(_para1:PISC_STATUS; _para2:Pisc_stmt_handle; _para3:Pchar; _para4:word):ISC_STATUS; gdsdecl; external gdslib;
  379. function isc_dsql_sql_info(_para1:PISC_STATUS; _para2:Pisc_stmt_handle; _para3:smallint; _para4:Pchar; _para5:smallint;
  380. _para6:Pchar):ISC_STATUS; gdsdecl; external gdslib;
  381. procedure isc_encode_date(_para1:pointer; _para2:PISC_QUAD); gdsdecl; external gdslib;
  382. procedure isc_encode_sql_date(_para1:pointer; _para2:PISC_DATE); gdsdecl; external gdslib;
  383. procedure isc_encode_sql_time(_para1:pointer; _para2:PISC_TIME); gdsdecl; external gdslib;
  384. procedure isc_encode_timestamp(_para1:pointer; _para2:PISC_TIMESTAMP); gdsdecl; external gdslib;
  385. function isc_event_block(_para1:PPchar; _para2:PPchar; _para3:word; args:array of const):ISC_LONG; cdecl; external gdslib;
  386. {!!MVC
  387. void isc_event_counts (unsigned ISC_LONG ,
  388. short,
  389. char ,
  390. char ); gdsdecl; external gdslib;
  391. !!MVC }
  392. procedure isc_expand_dpb(_para1:PPchar; _para2:Psmallint; args:array of const); cdecl; external gdslib;
  393. function isc_modify_dpb(_para1:PPchar; _para2:Psmallint; _para3:word; _para4:Pchar; _para5:smallint):longint; gdsdecl; external gdslib;
  394. function isc_free(_para1:Pchar):ISC_LONG; gdsdecl; external gdslib;
  395. function isc_get_segment(_para1:PISC_STATUS; _para2:Pisc_blob_handle; _para3:Pword; _para4:word; _para5:Pchar):ISC_STATUS; gdsdecl; external gdslib;
  396. function isc_get_slice(_para1:PISC_STATUS; _para2:Pisc_db_handle; _para3:Pisc_tr_handle; _para4:PISC_QUAD; _para5:smallint;
  397. _para6:Pchar; _para7:smallint; _para8:PISC_LONG; _para9:ISC_LONG; _para10:pointer;
  398. _para11:PISC_LONG):ISC_STATUS; gdsdecl; external gdslib;
  399. function isc_interprete(_para1:Pchar; _para2:PPISC_STATUS):ISC_STATUS; gdsdecl; external gdslib;
  400. function isc_open_blob(_para1:PISC_STATUS; _para2:Pisc_db_handle; _para3:Pisc_tr_handle; _para4:Pisc_blob_handle; _para5:PISC_QUAD):ISC_STATUS; gdsdecl; external gdslib;
  401. function isc_open_blob2(_para1:PISC_STATUS; _para2:Pisc_db_handle; _para3:Pisc_tr_handle; _para4:Pisc_blob_handle; _para5:PISC_QUAD;
  402. _para6:smallint; _para7:Pchar):ISC_STATUS; gdsdecl; external gdslib;
  403. function isc_prepare_transaction2(_para1:PISC_STATUS; _para2:Pisc_tr_handle; _para3:smallint; _para4:Pchar):ISC_STATUS; gdsdecl; external gdslib;
  404. procedure isc_print_sqlerror(_para1:smallint; _para2:PISC_STATUS); gdsdecl; external gdslib;
  405. function isc_print_status(_para1:PISC_STATUS):ISC_STATUS; gdsdecl; external gdslib;
  406. function isc_put_segment(_para1:PISC_STATUS; _para2:Pisc_blob_handle; _para3:word; _para4:Pchar):ISC_STATUS; gdsdecl; external gdslib;
  407. function isc_put_slice(_para1:PISC_STATUS; _para2:Pisc_db_handle; _para3:Pisc_tr_handle; _para4:PISC_QUAD; _para5:smallint;
  408. _para6:Pchar; _para7:smallint; _para8:PISC_LONG; _para9:ISC_LONG; _para10:pointer):ISC_STATUS; gdsdecl; external gdslib;
  409. function isc_que_events(_para1:PISC_STATUS; _para2:Pisc_db_handle; _para3:PISC_LONG; _para4:smallint; _para5:Pchar;
  410. _para6:isc_callback; _para7:pointer):ISC_STATUS; gdsdecl; external gdslib;
  411. function isc_rollback_retaining(_para1:PISC_STATUS; _para2:Pisc_tr_handle):ISC_STATUS; gdsdecl; external gdslib;
  412. function isc_rollback_transaction(_para1:PISC_STATUS; _para2:Pisc_tr_handle):ISC_STATUS; gdsdecl; external gdslib;
  413. function isc_start_multiple(_para1:PISC_STATUS; _para2:Pisc_tr_handle; _para3:smallint; _para4:pointer):ISC_STATUS; gdsdecl; external gdslib;
  414. function isc_start_transaction(_para1:PISC_STATUS; _para2:Pisc_tr_handle; _para3:smallint; args:array of const):ISC_STATUS; cdecl; external gdslib;
  415. function isc_sqlcode(_para1:PISC_STATUS):ISC_LONG; gdsdecl; external gdslib;
  416. procedure isc_sql_interprete(_para1:smallint; _para2:Pchar; _para3:smallint); gdsdecl; external gdslib;
  417. function isc_transaction_info(_para1:PISC_STATUS; _para2:Pisc_tr_handle; _para3:smallint; _para4:Pchar; _para5:smallint;
  418. _para6:Pchar):ISC_STATUS; gdsdecl; external gdslib;
  419. function isc_transact_request(_para1:PISC_STATUS; _para2:Pisc_db_handle; _para3:Pisc_tr_handle; _para4:word; _para5:Pchar;
  420. _para6:word; _para7:Pchar; _para8:word; _para9:Pchar):ISC_STATUS; gdsdecl; external gdslib;
  421. function isc_vax_integer(_para1:Pchar; _para2:smallint):ISC_LONG; gdsdecl; external gdslib;
  422. function isc_portable_integer(_para1:Pbyte; _para2:smallint):ISC_INT64; gdsdecl; external gdslib;
  423. { }
  424. { Security Functions and structures }
  425. { }
  426. const
  427. sec_uid_spec = $01;
  428. sec_gid_spec = $02;
  429. sec_server_spec = $04;
  430. sec_password_spec = $08;
  431. sec_group_name_spec = $10;
  432. sec_first_name_spec = $20;
  433. sec_middle_name_spec = $40;
  434. sec_last_name_spec = $80;
  435. sec_dba_user_name_spec = $100;
  436. sec_dba_password_spec = $200;
  437. sec_protocol_tcpip = 1;
  438. sec_protocol_netbeui = 2;
  439. sec_protocol_spx = 3;
  440. sec_protocol_local = 4;
  441. { which fields are specified }
  442. { the user's id }
  443. { the user's group id }
  444. { protocol to use for connection }
  445. { server to administer }
  446. { the user's name }
  447. { the user's password }
  448. { the group name }
  449. { the user's first name }
  450. { the user's middle name }
  451. { the user's last name }
  452. { the dba user name }
  453. { the dba password }
  454. type
  455. USER_SEC_DATA = record
  456. sec_flags : smallint;
  457. uid : longint;
  458. gid : longint;
  459. protocol : longint;
  460. server : Pchar;
  461. user_name : Pchar;
  462. password : Pchar;
  463. group_name : Pchar;
  464. first_name : Pchar;
  465. middle_name : Pchar;
  466. last_name : Pchar;
  467. dba_user_name : Pchar;
  468. dba_password : Pchar;
  469. end;
  470. TUSER_SEC_DATA = USER_SEC_DATA;
  471. PUSER_SEC_DATA = ^USER_SEC_DATA;
  472. function isc_add_user(_para1:PISC_STATUS; _para2:PUSER_SEC_DATA):longint; gdsdecl; external gdslib;
  473. function isc_delete_user(_para1:PISC_STATUS; _para2:PUSER_SEC_DATA):longint; gdsdecl; external gdslib;
  474. function isc_modify_user(_para1:PISC_STATUS; _para2:PUSER_SEC_DATA):longint; gdsdecl; external gdslib;
  475. { }
  476. { Other OSRI functions }
  477. { }
  478. function isc_compile_request(_para1:PISC_STATUS; _para2:Pisc_db_handle; _para3:Pisc_req_handle; _para4:smallint; _para5:Pchar):ISC_STATUS; gdsdecl; external gdslib;
  479. function isc_compile_request2(_para1:PISC_STATUS; _para2:Pisc_db_handle; _para3:Pisc_req_handle; _para4:smallint; _para5:Pchar):ISC_STATUS; gdsdecl; external gdslib;
  480. function isc_ddl(_para1:PISC_STATUS; _para2:Pisc_db_handle; _para3:Pisc_tr_handle; _para4:smallint; _para5:Pchar):ISC_STATUS; gdsdecl; external gdslib;
  481. function isc_prepare_transaction(_para1:PISC_STATUS; _para2:Pisc_tr_handle):ISC_STATUS; gdsdecl; external gdslib;
  482. function isc_receive(_para1:PISC_STATUS; _para2:Pisc_req_handle; _para3:smallint; _para4:smallint; _para5:pointer;
  483. _para6:smallint):ISC_STATUS; gdsdecl; external gdslib;
  484. function isc_reconnect_transaction(_para1:PISC_STATUS; _para2:Pisc_db_handle; _para3:Pisc_tr_handle; _para4:smallint; _para5:Pchar):ISC_STATUS; gdsdecl; external gdslib;
  485. function isc_release_request(_para1:PISC_STATUS; _para2:Pisc_req_handle):ISC_STATUS; gdsdecl; external gdslib;
  486. function isc_request_info(_para1:PISC_STATUS; _para2:Pisc_req_handle; _para3:smallint; _para4:smallint; _para5:Pchar;
  487. _para6:smallint; _para7:Pchar):ISC_STATUS; gdsdecl; external gdslib;
  488. function isc_seek_blob(_para1:PISC_STATUS; _para2:Pisc_blob_handle; _para3:smallint; _para4:ISC_LONG; _para5:PISC_LONG):ISC_STATUS; gdsdecl; external gdslib;
  489. function isc_send(_para1:PISC_STATUS; _para2:Pisc_req_handle; _para3:smallint; _para4:smallint; _para5:pointer;
  490. _para6:smallint):ISC_STATUS; gdsdecl; external gdslib;
  491. function isc_start_and_send(_para1:PISC_STATUS; _para2:Pisc_req_handle; _para3:Pisc_tr_handle; _para4:smallint; _para5:smallint;
  492. _para6:pointer; _para7:smallint):ISC_STATUS; gdsdecl; external gdslib;
  493. function isc_start_request(_para1:PISC_STATUS; _para2:Pisc_req_handle; _para3:Pisc_tr_handle; _para4:smallint):ISC_STATUS; gdsdecl; external gdslib;
  494. function isc_unwind_request(_para1:PISC_STATUS; _para2:Pisc_tr_handle; _para3:smallint):ISC_STATUS; gdsdecl; external gdslib;
  495. function isc_wait_for_event(_para1:PISC_STATUS; _para2:Pisc_db_handle; _para3:smallint; _para4:Pchar; _para5:Pchar):ISC_STATUS; gdsdecl; external gdslib;
  496. { }
  497. { Other Sql functions }
  498. { }
  499. function isc_close(_para1:PISC_STATUS; _para2:Pchar):ISC_STATUS; gdsdecl; external gdslib;
  500. function isc_declare(_para1:PISC_STATUS; _para2:Pchar; _para3:Pchar):ISC_STATUS; gdsdecl; external gdslib;
  501. function isc_describe(_para1:PISC_STATUS; _para2:Pchar; _para3:PXSQLDA):ISC_STATUS; gdsdecl; external gdslib;
  502. function isc_describe_bind(_para1:PISC_STATUS; _para2:Pchar; _para3:PXSQLDA):ISC_STATUS; gdsdecl; external gdslib;
  503. function isc_execute(_para1:PISC_STATUS; _para2:Pisc_tr_handle; _para3:Pchar; _para4:PXSQLDA):ISC_STATUS; gdsdecl; external gdslib;
  504. function isc_execute_immediate(_para1:PISC_STATUS; _para2:Pisc_db_handle; _para3:Pisc_tr_handle; _para4:Psmallint; _para5:Pchar):ISC_STATUS; gdsdecl; external gdslib;
  505. function isc_fetch(_para1:PISC_STATUS; _para2:Pchar; _para3:PXSQLDA):ISC_STATUS; gdsdecl; external gdslib;
  506. function isc_open(_para1:PISC_STATUS; _para2:Pisc_tr_handle; _para3:Pchar; _para4:PXSQLDA):ISC_STATUS; gdsdecl; external gdslib;
  507. function isc_prepare(_para1:PISC_STATUS; _para2:Pisc_db_handle; _para3:Pisc_tr_handle; _para4:Pchar; _para5:Psmallint;
  508. _para6:Pchar; _para7:PXSQLDA):ISC_STATUS; gdsdecl; external gdslib;
  509. { }
  510. { Other Dynamic sql functions }
  511. { }
  512. function isc_dsql_execute_m(_para1:PISC_STATUS; _para2:Pisc_tr_handle; _para3:Pisc_stmt_handle; _para4:word; _para5:Pchar;
  513. _para6:word; _para7:word; _para8:Pchar):ISC_STATUS; gdsdecl; external gdslib;
  514. function isc_dsql_execute2_m(_para1:PISC_STATUS; _para2:Pisc_tr_handle; _para3:Pisc_stmt_handle; _para4:word; _para5:Pchar;
  515. _para6:word; _para7:word; _para8:Pchar; _para9:word; _para10:Pchar;
  516. _para11:word; _para12:word; _para13:Pchar):ISC_STATUS; gdsdecl; external gdslib;
  517. function isc_dsql_execute_immediate_m(_para1:PISC_STATUS; _para2:Pisc_db_handle; _para3:Pisc_tr_handle; _para4:word; _para5:Pchar;
  518. _para6:word; _para7:word; _para8:Pchar; _para9:word; _para10:word;
  519. _para11:Pchar):ISC_STATUS; gdsdecl; external gdslib;
  520. function isc_dsql_exec_immed3_m(_para1:PISC_STATUS; _para2:Pisc_db_handle; _para3:Pisc_tr_handle; _para4:word; _para5:Pchar;
  521. _para6:word; _para7:word; _para8:Pchar; _para9:word; _para10:word;
  522. _para11:Pchar; _para12:word; _para13:Pchar; _para14:word; _para15:word;
  523. _para16:Pchar):ISC_STATUS; gdsdecl; external gdslib;
  524. function isc_dsql_fetch_m(_para1:PISC_STATUS; _para2:Pisc_stmt_handle; _para3:word; _para4:Pchar; _para5:word;
  525. _para6:word; _para7:Pchar):ISC_STATUS; gdsdecl; external gdslib;
  526. function isc_dsql_insert_m(_para1:PISC_STATUS; _para2:Pisc_stmt_handle; _para3:word; _para4:Pchar; _para5:word;
  527. _para6:word; _para7:Pchar):ISC_STATUS; gdsdecl; external gdslib;
  528. function isc_dsql_prepare_m(_para1:PISC_STATUS; _para2:Pisc_tr_handle; _para3:Pisc_stmt_handle; _para4:word; _para5:Pchar;
  529. _para6:word; _para7:word; _para8:Pchar; _para9:word; _para10:Pchar):ISC_STATUS; gdsdecl; external gdslib;
  530. function isc_dsql_release(_para1:PISC_STATUS; _para2:Pchar):ISC_STATUS; gdsdecl; external gdslib;
  531. function isc_embed_dsql_close(_para1:PISC_STATUS; _para2:Pchar):ISC_STATUS; gdsdecl; external gdslib;
  532. function isc_embed_dsql_declare(_para1:PISC_STATUS; _para2:Pchar; _para3:Pchar):ISC_STATUS; gdsdecl; external gdslib;
  533. function isc_embed_dsql_describe(_para1:PISC_STATUS; _para2:Pchar; _para3:word; _para4:PXSQLDA):ISC_STATUS; gdsdecl; external gdslib;
  534. function isc_embed_dsql_describe_bind(_para1:PISC_STATUS; _para2:Pchar; _para3:word; _para4:PXSQLDA):ISC_STATUS; gdsdecl; external gdslib;
  535. function isc_embed_dsql_execute(_para1:PISC_STATUS; _para2:Pisc_tr_handle; _para3:Pchar; _para4:word; _para5:PXSQLDA):ISC_STATUS; gdsdecl; external gdslib;
  536. function isc_embed_dsql_execute2(_para1:PISC_STATUS; _para2:Pisc_tr_handle; _para3:Pchar; _para4:word; _para5:PXSQLDA;
  537. _para6:PXSQLDA):ISC_STATUS; gdsdecl; external gdslib;
  538. function isc_embed_dsql_execute_immed(_para1:PISC_STATUS; _para2:Pisc_db_handle; _para3:Pisc_tr_handle; _para4:word; _para5:Pchar;
  539. _para6:word; _para7:PXSQLDA):ISC_STATUS; gdsdecl; external gdslib;
  540. function isc_embed_dsql_fetch(_para1:PISC_STATUS; _para2:Pchar; _para3:word; _para4:PXSQLDA):ISC_STATUS; gdsdecl; external gdslib;
  541. function isc_embed_dsql_open(_para1:PISC_STATUS; _para2:Pisc_tr_handle; _para3:Pchar; _para4:word; _para5:PXSQLDA):ISC_STATUS; gdsdecl; external gdslib;
  542. function isc_embed_dsql_open2(_para1:PISC_STATUS; _para2:Pisc_tr_handle; _para3:Pchar; _para4:word; _para5:PXSQLDA;
  543. _para6:PXSQLDA):ISC_STATUS; gdsdecl; external gdslib;
  544. function isc_embed_dsql_insert(_para1:PISC_STATUS; _para2:Pchar; _para3:word; _para4:PXSQLDA):ISC_STATUS; gdsdecl; external gdslib;
  545. function isc_embed_dsql_prepare(_para1:PISC_STATUS; _para2:Pisc_db_handle; _para3:Pisc_tr_handle; _para4:Pchar; _para5:word;
  546. _para6:Pchar; _para7:word; _para8:PXSQLDA):ISC_STATUS; gdsdecl; external gdslib;
  547. function isc_embed_dsql_release(_para1:PISC_STATUS; _para2:Pchar):ISC_STATUS; gdsdecl; external gdslib;
  548. { }
  549. { Other Blob functions }
  550. { }
  551. function BLOB_open(_para1:isc_blob_handle; _para2:Pchar; _para3:longint):PBSTREAM; gdsdecl; external gdslib;
  552. function BLOB_put(_para1:char; _para2:PBSTREAM):longint; gdsdecl; external gdslib;
  553. function BLOB_close(_para1:PBSTREAM):longint; gdsdecl; external gdslib;
  554. function BLOB_get(_para1:PBSTREAM):longint; gdsdecl; external gdslib;
  555. function BLOB_display(_para1:PISC_QUAD; _para2:isc_db_handle; _para3:isc_tr_handle; _para4:Pchar):longint; gdsdecl; external gdslib;
  556. function BLOB_dump(_para1:PISC_QUAD; _para2:isc_db_handle; _para3:isc_tr_handle; _para4:Pchar):longint; gdsdecl; external gdslib;
  557. function BLOB_edit(_para1:PISC_QUAD; _para2:isc_db_handle; _para3:isc_tr_handle; _para4:Pchar):longint; gdsdecl; external gdslib;
  558. function BLOB_load(_para1:PISC_QUAD; _para2:isc_db_handle; _para3:isc_tr_handle; _para4:Pchar):longint; gdsdecl; external gdslib;
  559. function BLOB_text_dump(_para1:PISC_QUAD; _para2:isc_db_handle; _para3:isc_tr_handle; _para4:Pchar):longint; gdsdecl; external gdslib;
  560. function BLOB_text_load(_para1:PISC_QUAD; _para2:isc_db_handle; _para3:isc_tr_handle; _para4:Pchar):longint; gdsdecl; external gdslib;
  561. function Bopen(_para1:PISC_QUAD; _para2:isc_db_handle; _para3:isc_tr_handle; _para4:Pchar):PBSTREAM; gdsdecl; external gdslib;
  562. {$IFDEF Unix}
  563. function Bopen2(_para1:PISC_QUAD; _para2:isc_db_handle; _para3:isc_tr_handle; _para4:Pchar; _para5:word):PBSTREAM; gdsdecl; external gdslib;
  564. {$ENDIF}
  565. { }
  566. { Other Misc functions }
  567. { }
  568. function isc_ftof(_para1:Pchar; _para2:word; _para3:Pchar; _para4:word):ISC_LONG; gdsdecl; external gdslib;
  569. function isc_print_blr(_para1:Pchar; _para2:isc_callback; _para3:pointer; _para4:smallint):ISC_STATUS; gdsdecl; external gdslib;
  570. procedure isc_set_debug(_para1:longint); gdsdecl; external gdslib;
  571. procedure isc_qtoq(_para1:PISC_QUAD; _para2:PISC_QUAD); gdsdecl; external gdslib;
  572. procedure isc_vtof(_para1:Pchar; _para2:Pchar; _para3:word); gdsdecl; external gdslib;
  573. procedure isc_vtov(_para1:Pchar; _para2:Pchar; _para3:smallint); gdsdecl; external gdslib;
  574. function isc_version(_para1:Pisc_db_handle; _para2:isc_callback; _para3:pointer):longint; gdsdecl; external gdslib;
  575. {$IFDEF Unix}
  576. function isc_reset_fpe(_para1:word):ISC_LONG; gdsdecl; external gdslib;
  577. {$ENDIF}
  578. { }
  579. { Service manager functions }
  580. { }
  581. (*!!MVC
  582. #define ADD_SPB_LENGTH(p, length) { (p)++ = (length); \
  583. (p)++ = (length) >> 8;}
  584. #define ADD_SPB_NUMERIC(p, data) { (p)++ = (data); \
  585. (p)++ = (data) >> 8; \
  586. (p)++ = (data) >> 16; \
  587. (p)++ = (data) >> 24;}
  588. !!MVC *)
  589. function isc_service_attach(_para1:PISC_STATUS; _para2:word; _para3:Pchar; _para4:Pisc_svc_handle; _para5:word;
  590. _para6:Pchar):ISC_STATUS; gdsdecl; external gdslib;
  591. function isc_service_detach(_para1:PISC_STATUS; _para2:Pisc_svc_handle):ISC_STATUS; gdsdecl; external gdslib;
  592. function isc_service_query(_para1:PISC_STATUS; _para2:Pisc_svc_handle; _para3:Pisc_resv_handle; _para4:word; _para5:Pchar;
  593. _para6:word; _para7:Pchar; _para8:word; _para9:Pchar):ISC_STATUS; gdsdecl; external gdslib;
  594. function isc_service_start(_para1:PISC_STATUS; _para2:Pisc_svc_handle; _para3:Pisc_resv_handle; _para4:word; _para5:Pchar):ISC_STATUS; gdsdecl; external gdslib;
  595. { }
  596. { Forms functions }
  597. { }
  598. {$IFDEF Unix}
  599. function isc_compile_map(_para1:PISC_STATUS; _para2:Pisc_form_handle; _para3:Pisc_req_handle; _para4:Psmallint; _para5:Pchar):ISC_STATUS; gdsdecl; external gdslib;
  600. function isc_compile_menu(_para1:PISC_STATUS; _para2:Pisc_form_handle; _para3:Pisc_req_handle; _para4:Psmallint; _para5:Pchar):ISC_STATUS; gdsdecl; external gdslib;
  601. function isc_compile_sub_map(_para1:PISC_STATUS; _para2:Pisc_win_handle; _para3:Pisc_req_handle; _para4:Psmallint; _para5:Pchar):ISC_STATUS; gdsdecl; external gdslib;
  602. function isc_create_window(_para1:PISC_STATUS; _para2:Pisc_win_handle; _para3:Psmallint; _para4:Pchar; _para5:Psmallint;
  603. _para6:Psmallint):ISC_STATUS; gdsdecl; external gdslib;
  604. function isc_delete_window(_para1:PISC_STATUS; _para2:Pisc_win_handle):ISC_STATUS; gdsdecl; external gdslib;
  605. function isc_drive_form(_para1:PISC_STATUS; _para2:Pisc_db_handle; _para3:Pisc_tr_handle; _para4:Pisc_win_handle; _para5:Pisc_req_handle;
  606. _para6:Pbyte; _para7:Pbyte):ISC_STATUS; gdsdecl; external gdslib;
  607. function isc_drive_menu(_para1:PISC_STATUS; _para2:Pisc_win_handle; _para3:Pisc_req_handle; _para4:Psmallint; _para5:Pchar;
  608. _para6:Psmallint; _para7:Pchar; _para8:Psmallint; _para9:Psmallint; _para10:Pchar;
  609. _para11:PISC_LONG):ISC_STATUS; gdsdecl; external gdslib;
  610. function isc_form_delete(_para1:PISC_STATUS; _para2:Pisc_form_handle):ISC_STATUS; gdsdecl; external gdslib;
  611. function isc_form_fetch(_para1:PISC_STATUS; _para2:Pisc_db_handle; _para3:Pisc_tr_handle; _para4:Pisc_req_handle; _para5:Pbyte):ISC_STATUS; gdsdecl; external gdslib;
  612. function isc_form_insert(_para1:PISC_STATUS; _para2:Pisc_db_handle; _para3:Pisc_tr_handle; _para4:Pisc_req_handle; _para5:Pbyte):ISC_STATUS; gdsdecl; external gdslib;
  613. function isc_get_entree(_para1:PISC_STATUS; _para2:Pisc_req_handle; _para3:Psmallint; _para4:Pchar; _para5:PISC_LONG;
  614. _para6:Psmallint):ISC_STATUS; gdsdecl; external gdslib;
  615. function isc_initialize_menu(_para1:PISC_STATUS; _para2:Pisc_req_handle):ISC_STATUS; gdsdecl; external gdslib;
  616. function isc_menu(_para1:PISC_STATUS; _para2:Pisc_win_handle; _para3:Pisc_req_handle; _para4:Psmallint; _para5:Pchar):ISC_STATUS; gdsdecl; external gdslib;
  617. function isc_load_form(_para1:PISC_STATUS; _para2:Pisc_db_handle; _para3:Pisc_tr_handle; _para4:Pisc_form_handle; _para5:Psmallint;
  618. _para6:Pchar):ISC_STATUS; gdsdecl; external gdslib;
  619. function isc_pop_window(_para1:PISC_STATUS; _para2:Pisc_win_handle):ISC_STATUS; gdsdecl; external gdslib;
  620. function isc_put_entree(_para1:PISC_STATUS; _para2:Pisc_req_handle; _para3:Psmallint; _para4:Pchar; _para5:PISC_LONG):ISC_STATUS; gdsdecl; external gdslib;
  621. function isc_reset_form(_para1:PISC_STATUS; _para2:Pisc_req_handle):ISC_STATUS; gdsdecl; external gdslib;
  622. function isc_suspend_window(_para1:PISC_STATUS; _para2:Pisc_win_handle):ISC_STATUS; gdsdecl; external gdslib;
  623. {$ENDIF}
  624. function isc_attach_database:ISC_STATUS; gdsdecl; external gdslib;
  625. function isc_array_gen_sdl:ISC_STATUS; gdsdecl; external gdslib;
  626. function isc_array_get_slice:ISC_STATUS; gdsdecl; external gdslib;
  627. function isc_array_lookup_bounds:ISC_STATUS; gdsdecl; external gdslib;
  628. function isc_array_lookup_desc:ISC_STATUS; gdsdecl; external gdslib;
  629. function isc_array_set_desc:ISC_STATUS; gdsdecl; external gdslib;
  630. function isc_array_put_slice:ISC_STATUS; gdsdecl; external gdslib;
  631. function isc_blob_gen_bpb:ISC_STATUS; gdsdecl; external gdslib;
  632. function isc_blob_info:ISC_STATUS; gdsdecl; external gdslib;
  633. function isc_blob_lookup_desc:ISC_STATUS; gdsdecl; external gdslib;
  634. function isc_blob_set_desc:ISC_STATUS; gdsdecl; external gdslib;
  635. function isc_cancel_blob:ISC_STATUS; gdsdecl; external gdslib;
  636. function isc_cancel_events:ISC_STATUS; gdsdecl; external gdslib;
  637. function isc_close_blob:ISC_STATUS; gdsdecl; external gdslib;
  638. function isc_commit_retaining:ISC_STATUS; gdsdecl; external gdslib;
  639. function isc_commit_transaction:ISC_STATUS; gdsdecl; external gdslib;
  640. function isc_compile_request:ISC_STATUS; gdsdecl; external gdslib;
  641. function isc_compile_request2:ISC_STATUS; gdsdecl; external gdslib;
  642. function isc_create_blob:ISC_STATUS; gdsdecl; external gdslib;
  643. function isc_create_blob2:ISC_STATUS; gdsdecl; external gdslib;
  644. function isc_create_database:ISC_STATUS; gdsdecl; external gdslib;
  645. function isc_database_info:ISC_STATUS; gdsdecl; external gdslib;
  646. function isc_ddl:ISC_STATUS; gdsdecl; external gdslib;
  647. procedure isc_decode_date; gdsdecl; external gdslib;
  648. procedure isc_decode_sql_date; gdsdecl; external gdslib;
  649. procedure isc_decode_sql_time; gdsdecl; external gdslib;
  650. procedure isc_decode_timestamp; gdsdecl; external gdslib;
  651. function isc_detach_database:ISC_STATUS; gdsdecl; external gdslib;
  652. function isc_drop_database:ISC_STATUS; gdsdecl; external gdslib;
  653. procedure isc_encode_date; gdsdecl; external gdslib;
  654. procedure isc_encode_sql_date; gdsdecl; external gdslib;
  655. procedure isc_encode_sql_time; gdsdecl; external gdslib;
  656. procedure isc_encode_timestamp; gdsdecl; external gdslib;
  657. function isc_event_block:ISC_LONG; cdecl; external gdslib;
  658. procedure isc_event_counts; gdsdecl; external gdslib;
  659. procedure isc_expand_dpb; cdecl; external gdslib;
  660. function isc_modify_dpb:longint; gdsdecl; external gdslib;
  661. function isc_free:ISC_LONG; gdsdecl; external gdslib;
  662. function isc_get_segment:ISC_STATUS; gdsdecl; external gdslib;
  663. function isc_get_slice:ISC_STATUS; gdsdecl; external gdslib;
  664. function isc_interprete:ISC_STATUS; gdsdecl; external gdslib;
  665. function isc_open_blob:ISC_STATUS; gdsdecl; external gdslib;
  666. function isc_open_blob2:ISC_STATUS; gdsdecl; external gdslib;
  667. function isc_prepare_transaction:ISC_STATUS; gdsdecl; external gdslib;
  668. function isc_prepare_transaction2:ISC_STATUS; gdsdecl; external gdslib;
  669. procedure isc_print_sqlerror; gdsdecl; external gdslib;
  670. function isc_print_status:ISC_STATUS; gdsdecl; external gdslib;
  671. function isc_put_segment:ISC_STATUS; gdsdecl; external gdslib;
  672. function isc_put_slice:ISC_STATUS; gdsdecl; external gdslib;
  673. function isc_que_events:ISC_STATUS; gdsdecl; external gdslib;
  674. function isc_receive:ISC_STATUS; gdsdecl; external gdslib;
  675. function isc_reconnect_transaction:ISC_STATUS; gdsdecl; external gdslib;
  676. function isc_release_request:ISC_STATUS; gdsdecl; external gdslib;
  677. function isc_request_info:ISC_STATUS; gdsdecl; external gdslib;
  678. {$IFDEF Unix}
  679. function isc_reset_fpe:ISC_LONG; gdsdecl; external gdslib;
  680. {$ENDIF}
  681. function isc_rollback_transaction:ISC_STATUS; gdsdecl; external gdslib;
  682. function isc_rollback_retaining:ISC_STATUS; gdsdecl; external gdslib;
  683. function isc_seek_blob:ISC_STATUS; gdsdecl; external gdslib;
  684. function isc_send:ISC_STATUS; gdsdecl; external gdslib;
  685. function isc_service_attach:ISC_STATUS; gdsdecl; external gdslib;
  686. function isc_service_detach:ISC_STATUS; gdsdecl; external gdslib;
  687. function isc_service_query:ISC_STATUS; gdsdecl; external gdslib;
  688. function isc_service_start:ISC_STATUS; gdsdecl; external gdslib;
  689. function isc_start_and_send:ISC_STATUS; gdsdecl; external gdslib;
  690. function isc_start_multiple:ISC_STATUS; gdsdecl; external gdslib;
  691. function isc_start_request:ISC_STATUS; gdsdecl; external gdslib;
  692. function isc_start_transaction:ISC_STATUS; cdecl; external gdslib;
  693. function isc_sqlcode:ISC_LONG; gdsdecl; external gdslib;
  694. function isc_transaction_info:ISC_STATUS; gdsdecl; external gdslib;
  695. function isc_transact_request:ISC_STATUS; gdsdecl; external gdslib;
  696. function isc_unwind_request:ISC_STATUS; gdsdecl; external gdslib;
  697. function isc_wait_for_event:ISC_STATUS; gdsdecl; external gdslib;
  698. function isc_ftof:ISC_LONG; gdsdecl; external gdslib;
  699. function isc_print_blr:ISC_STATUS; gdsdecl; external gdslib;
  700. procedure isc_set_debug; gdsdecl; external gdslib;
  701. procedure isc_qtoq; gdsdecl; external gdslib;
  702. function isc_vax_integer:ISC_LONG; gdsdecl; external gdslib;
  703. procedure isc_vtof; gdsdecl; external gdslib;
  704. procedure isc_vtov; gdsdecl; external gdslib;
  705. function isc_version:longint; gdsdecl; external gdslib;
  706. { }
  707. { Blob functions }
  708. { }
  709. function Bopen:PBSTREAM; gdsdecl; external gdslib;
  710. function BLOB_open:PBSTREAM; gdsdecl; external gdslib;
  711. {$IFDEF Unix}
  712. function Bopen2:PBSTREAM; gdsdecl; external gdslib;
  713. {$ENDIF}
  714. { __cplusplus || __STDC__ }
  715. { }
  716. { Actions to pass to the blob filter (ctl_source) }
  717. { }
  718. const
  719. isc_blob_filter_open = 0;
  720. isc_blob_filter_get_segment = 1;
  721. isc_blob_filter_close = 2;
  722. isc_blob_filter_create = 3;
  723. isc_blob_filter_put_segment = 4;
  724. isc_blob_filter_alloc = 5;
  725. isc_blob_filter_free = 6;
  726. isc_blob_filter_seek = 7;
  727. { }
  728. { Blr definitions }
  729. { }
  730. {$ifndef _JRD_BLR_H_}
  731. {!!MVC
  732. #define blr_word(n) ((n) % 256), ((n) / 256)
  733. !!MVC }
  734. const
  735. blr_text = 14;
  736. blr_text2 = 15;
  737. blr_short = 7;
  738. blr_long = 8;
  739. blr_quad = 9;
  740. blr_int64 = 16;
  741. blr_float = 10;
  742. blr_double = 27;
  743. blr_d_float = 11;
  744. blr_timestamp = 35;
  745. blr_varying = 37;
  746. blr_varying2 = 38;
  747. blr_blob = 261;
  748. blr_cstring = 40;
  749. blr_cstring2 = 41;
  750. blr_blob_id = 45;
  751. blr_sql_date = 12;
  752. blr_sql_time = 13;
  753. { Historical alias for pre V6 applications }
  754. blr_date = blr_timestamp;
  755. blr_inner = 0;
  756. blr_left = 1;
  757. blr_right = 2;
  758. blr_full = 3;
  759. blr_gds_code = 0;
  760. blr_sql_code = 1;
  761. blr_exception = 2;
  762. blr_trigger_code = 3;
  763. blr_default_code = 4;
  764. blr_version4 = 4;
  765. blr_version5 = 5;
  766. blr_eoc = 76;
  767. blr_end = 255;
  768. blr_assignment = 1;
  769. blr_begin = 2;
  770. blr_dcl_variable = 3;
  771. blr_message = 4;
  772. blr_erase = 5;
  773. blr_fetch = 6;
  774. blr_for = 7;
  775. blr_if = 8;
  776. blr_loop = 9;
  777. blr_modify = 10;
  778. blr_handler = 11;
  779. blr_receive = 12;
  780. blr_select = 13;
  781. blr_send = 14;
  782. blr_store = 15;
  783. blr_label = 17;
  784. blr_leave = 18;
  785. blr_store2 = 19;
  786. blr_post = 20;
  787. blr_literal = 21;
  788. blr_dbkey = 22;
  789. blr_field = 23;
  790. blr_fid = 24;
  791. blr_parameter = 25;
  792. blr_variable = 26;
  793. blr_average = 27;
  794. blr_count = 28;
  795. blr_maximum = 29;
  796. blr_minimum = 30;
  797. blr_total = 31;
  798. blr_add = 34;
  799. blr_subtract = 35;
  800. blr_multiply = 36;
  801. blr_divide = 37;
  802. blr_negate = 38;
  803. blr_concatenate = 39;
  804. blr_substring = 40;
  805. blr_parameter2 = 41;
  806. blr_from = 42;
  807. blr_via = 43;
  808. blr_user_name = 44;
  809. blr_null = 45;
  810. blr_eql = 47;
  811. blr_neq = 48;
  812. blr_gtr = 49;
  813. blr_geq = 50;
  814. blr_lss = 51;
  815. blr_leq = 52;
  816. blr_containing = 53;
  817. blr_matching = 54;
  818. blr_starting = 55;
  819. blr_between = 56;
  820. blr_or = 57;
  821. blr_and = 58;
  822. blr_not = 59;
  823. blr_any = 60;
  824. blr_missing = 61;
  825. blr_unique = 62;
  826. blr_like = 63;
  827. blr_stream = 65;
  828. blr_set_index = 66;
  829. blr_rse = 67;
  830. blr_first = 68;
  831. blr_project = 69;
  832. blr_sort = 70;
  833. blr_boolean = 71;
  834. blr_ascending = 72;
  835. blr_descending = 73;
  836. blr_relation = 74;
  837. blr_rid = 75;
  838. blr_union = 76;
  839. blr_map = 77;
  840. blr_group_by = 78;
  841. blr_aggregate = 79;
  842. blr_join_type = 80;
  843. blr_agg_count = 83;
  844. blr_agg_max = 84;
  845. blr_agg_min = 85;
  846. blr_agg_total = 86;
  847. blr_agg_average = 87;
  848. blr_parameter3 = 88;
  849. blr_run_count = 118;
  850. blr_run_max = 89;
  851. blr_run_min = 90;
  852. blr_run_total = 91;
  853. blr_run_average = 92;
  854. blr_agg_count2 = 93;
  855. blr_agg_count_distinct = 94;
  856. blr_agg_total_distinct = 95;
  857. blr_agg_average_distinct = 96;
  858. blr_function = 100;
  859. blr_gen_id = 101;
  860. blr_prot_mask = 102;
  861. blr_upcase = 103;
  862. blr_lock_state = 104;
  863. blr_value_if = 105;
  864. blr_matching2 = 106;
  865. blr_index = 107;
  866. blr_ansi_like = 108;
  867. blr_bookmark = 109;
  868. blr_crack = 110;
  869. blr_force_crack = 111;
  870. blr_seek = 112;
  871. blr_find = 113;
  872. blr_continue = 0;
  873. blr_forward = 1;
  874. blr_backward = 2;
  875. blr_bof_forward = 3;
  876. blr_eof_backward = 4;
  877. blr_lock_relation = 114;
  878. blr_lock_record = 115;
  879. blr_set_bookmark = 116;
  880. blr_get_bookmark = 117;
  881. blr_rs_stream = 119;
  882. blr_exec_proc = 120;
  883. blr_begin_range = 121;
  884. blr_end_range = 122;
  885. blr_delete_range = 123;
  886. blr_procedure = 124;
  887. blr_pid = 125;
  888. blr_exec_pid = 126;
  889. blr_singular = 127;
  890. blr_abort = 128;
  891. blr_block = 129;
  892. blr_error_handler = 130;
  893. blr_cast = 131;
  894. blr_release_lock = 132;
  895. blr_release_locks = 133;
  896. blr_start_savepoint = 134;
  897. blr_end_savepoint = 135;
  898. blr_find_dbkey = 136;
  899. blr_range_relation = 137;
  900. blr_delete_ranges = 138;
  901. blr_plan = 139;
  902. blr_merge = 140;
  903. blr_join = 141;
  904. blr_sequential = 142;
  905. blr_navigational = 143;
  906. blr_indices = 144;
  907. blr_retrieve = 145;
  908. blr_relation2 = 146;
  909. blr_rid2 = 147;
  910. blr_reset_stream = 148;
  911. blr_release_bookmark = 149;
  912. blr_set_generator = 150;
  913. blr_ansi_any = 151;
  914. blr_exists = 152;
  915. blr_cardinality = 153;
  916. { get tid of record }
  917. blr_record_version = 154;
  918. { fake server stall }
  919. blr_stall = 155;
  920. blr_seek_no_warn = 156;
  921. blr_find_dbkey_version = 157;
  922. blr_ansi_all = 158;
  923. blr_extract = 159;
  924. { sub parameters for blr_extract }
  925. blr_extract_year = 0;
  926. blr_extract_month = 1;
  927. blr_extract_day = 2;
  928. blr_extract_hour = 3;
  929. blr_extract_minute = 4;
  930. blr_extract_second = 5;
  931. blr_extract_weekday = 6;
  932. blr_extract_yearday = 7;
  933. blr_current_date = 160;
  934. blr_current_timestamp = 161;
  935. blr_current_time = 162;
  936. { These verbs were added in 6.0, primarily to support 64-bit integers }
  937. blr_add2 = 163;
  938. blr_subtract2 = 164;
  939. blr_multiply2 = 165;
  940. blr_divide2 = 166;
  941. blr_agg_total2 = 167;
  942. blr_agg_total_distinct2 = 168;
  943. blr_agg_average2 = 169;
  944. blr_agg_average_distinct2 = 170;
  945. blr_average2 = 171;
  946. blr_gen_id2 = 172;
  947. blr_set_generator2 = 173;
  948. {$endif}
  949. { _JRD_BLR_H_ }
  950. { }
  951. { Database parameter block stuff }
  952. { }
  953. const
  954. isc_dpb_version1 = 1;
  955. isc_dpb_cdd_pathname = 1;
  956. isc_dpb_allocation = 2;
  957. isc_dpb_journal = 3;
  958. isc_dpb_page_size = 4;
  959. isc_dpb_num_buffers = 5;
  960. isc_dpb_buffer_length = 6;
  961. isc_dpb_debug = 7;
  962. isc_dpb_garbage_collect = 8;
  963. isc_dpb_verify = 9;
  964. isc_dpb_sweep = 10;
  965. isc_dpb_enable_journal = 11;
  966. isc_dpb_disable_journal = 12;
  967. isc_dpb_dbkey_scope = 13;
  968. isc_dpb_number_of_users = 14;
  969. isc_dpb_trace = 15;
  970. isc_dpb_no_garbage_collect = 16;
  971. isc_dpb_damaged = 17;
  972. isc_dpb_license = 18;
  973. isc_dpb_sys_user_name = 19;
  974. isc_dpb_encrypt_key = 20;
  975. isc_dpb_activate_shadow = 21;
  976. isc_dpb_sweep_interval = 22;
  977. isc_dpb_delete_shadow = 23;
  978. isc_dpb_force_write = 24;
  979. isc_dpb_begin_log = 25;
  980. isc_dpb_quit_log = 26;
  981. isc_dpb_no_reserve = 27;
  982. isc_dpb_user_name = 28;
  983. isc_dpb_password = 29;
  984. isc_dpb_password_enc = 30;
  985. isc_dpb_sys_user_name_enc = 31;
  986. isc_dpb_interp = 32;
  987. isc_dpb_online_dump = 33;
  988. isc_dpb_old_file_size = 34;
  989. isc_dpb_old_num_files = 35;
  990. isc_dpb_old_file = 36;
  991. isc_dpb_old_start_page = 37;
  992. isc_dpb_old_start_seqno = 38;
  993. isc_dpb_old_start_file = 39;
  994. isc_dpb_drop_walfile = 40;
  995. isc_dpb_old_dump_id = 41;
  996. isc_dpb_wal_backup_dir = 42;
  997. isc_dpb_wal_chkptlen = 43;
  998. isc_dpb_wal_numbufs = 44;
  999. isc_dpb_wal_bufsize = 45;
  1000. isc_dpb_wal_grp_cmt_wait = 46;
  1001. isc_dpb_lc_messages = 47;
  1002. isc_dpb_lc_ctype = 48;
  1003. isc_dpb_cache_manager = 49;
  1004. isc_dpb_shutdown = 50;
  1005. isc_dpb_online = 51;
  1006. isc_dpb_shutdown_delay = 52;
  1007. isc_dpb_reserved = 53;
  1008. isc_dpb_overwrite = 54;
  1009. isc_dpb_sec_attach = 55;
  1010. isc_dpb_disable_wal = 56;
  1011. isc_dpb_connect_timeout = 57;
  1012. isc_dpb_dummy_packet_interval = 58;
  1013. isc_dpb_gbak_attach = 59;
  1014. isc_dpb_sql_role_name = 60;
  1015. isc_dpb_set_page_buffers = 61;
  1016. isc_dpb_working_directory = 62;
  1017. isc_dpb_SQL_dialect = 63;
  1018. isc_dpb_set_db_readonly = 64;
  1019. isc_dpb_set_db_SQL_dialect = 65;
  1020. isc_dpb_gfix_attach = 66;
  1021. isc_dpb_gstat_attach = 67;
  1022. { }
  1023. { isc_dpb_verify specific flags }
  1024. { }
  1025. isc_dpb_pages = 1;
  1026. isc_dpb_records = 2;
  1027. isc_dpb_indices = 4;
  1028. isc_dpb_transactions = 8;
  1029. isc_dpb_no_update = 16;
  1030. isc_dpb_repair = 32;
  1031. isc_dpb_ignore = 64;
  1032. { }
  1033. { isc_dpb_shutdown specific flags }
  1034. { }
  1035. isc_dpb_shut_cache = 1;
  1036. isc_dpb_shut_attachment = 2;
  1037. isc_dpb_shut_transaction = 4;
  1038. isc_dpb_shut_force = 8;
  1039. { }
  1040. { Bit assignments in RDB$SYSTEM_FLAG }
  1041. { }
  1042. RDB_system = 1;
  1043. RDB_id_assigned = 2;
  1044. { }
  1045. { Transaction parameter block stuff }
  1046. { }
  1047. isc_tpb_version1 = 1;
  1048. isc_tpb_version3 = 3;
  1049. isc_tpb_consistency = 1;
  1050. isc_tpb_concurrency = 2;
  1051. isc_tpb_shared = 3;
  1052. isc_tpb_protected = 4;
  1053. isc_tpb_exclusive = 5;
  1054. isc_tpb_wait = 6;
  1055. isc_tpb_nowait = 7;
  1056. isc_tpb_read = 8;
  1057. isc_tpb_write = 9;
  1058. isc_tpb_lock_read = 10;
  1059. isc_tpb_lock_write = 11;
  1060. isc_tpb_verb_time = 12;
  1061. isc_tpb_commit_time = 13;
  1062. isc_tpb_ignore_limbo = 14;
  1063. isc_tpb_read_committed = 15;
  1064. isc_tpb_autocommit = 16;
  1065. isc_tpb_rec_version = 17;
  1066. isc_tpb_no_rec_version = 18;
  1067. isc_tpb_restart_requests = 19;
  1068. isc_tpb_no_auto_undo = 20;
  1069. { }
  1070. { Blob Parameter Block }
  1071. { }
  1072. isc_bpb_version1 = 1;
  1073. isc_bpb_source_type = 1;
  1074. isc_bpb_target_type = 2;
  1075. isc_bpb_type = 3;
  1076. isc_bpb_source_interp = 4;
  1077. isc_bpb_target_interp = 5;
  1078. isc_bpb_filter_parameter = 6;
  1079. isc_bpb_type_segmented = 0;
  1080. isc_bpb_type_stream = 1;
  1081. { }
  1082. { Service parameter block stuff }
  1083. { }
  1084. isc_spb_version1 = 1;
  1085. isc_spb_current_version = 2;
  1086. isc_spb_version = isc_spb_current_version;
  1087. isc_spb_user_name = isc_dpb_user_name;
  1088. isc_spb_sys_user_name = isc_dpb_sys_user_name;
  1089. isc_spb_sys_user_name_enc = isc_dpb_sys_user_name_enc;
  1090. isc_spb_password = isc_dpb_password;
  1091. isc_spb_password_enc = isc_dpb_password_enc;
  1092. isc_spb_command_line = 105;
  1093. isc_spb_dbname = 106;
  1094. isc_spb_verbose = 107;
  1095. isc_spb_options = 108;
  1096. isc_spb_connect_timeout = isc_dpb_connect_timeout;
  1097. isc_spb_dummy_packet_interval = isc_dpb_dummy_packet_interval;
  1098. isc_spb_sql_role_name = isc_dpb_sql_role_name;
  1099. { }
  1100. { Information call declarations }
  1101. { }
  1102. { }
  1103. { Common, structural codes }
  1104. { }
  1105. isc_info_end = 1;
  1106. isc_info_truncated = 2;
  1107. isc_info_error = 3;
  1108. isc_info_data_not_ready = 4;
  1109. isc_info_flag_end = 127;
  1110. { }
  1111. { Database information items }
  1112. { }
  1113. isc_info_db_id = 4;
  1114. isc_info_reads = 5;
  1115. isc_info_writes = 6;
  1116. isc_info_fetches = 7;
  1117. isc_info_marks = 8;
  1118. isc_info_implementation = 11;
  1119. isc_info_version = 12;
  1120. isc_info_base_level = 13;
  1121. isc_info_page_size = 14;
  1122. isc_info_num_buffers = 15;
  1123. isc_info_limbo = 16;
  1124. isc_info_current_memory = 17;
  1125. isc_info_max_memory = 18;
  1126. isc_info_window_turns = 19;
  1127. isc_info_license = 20;
  1128. isc_info_allocation = 21;
  1129. isc_info_attachment_id = 22;
  1130. isc_info_read_seq_count = 23;
  1131. isc_info_read_idx_count = 24;
  1132. isc_info_insert_count = 25;
  1133. isc_info_update_count = 26;
  1134. isc_info_delete_count = 27;
  1135. isc_info_backout_count = 28;
  1136. isc_info_purge_count = 29;
  1137. isc_info_expunge_count = 30;
  1138. isc_info_sweep_interval = 31;
  1139. isc_info_ods_version = 32;
  1140. isc_info_ods_minor_version = 33;
  1141. isc_info_no_reserve = 34;
  1142. isc_info_logfile = 35;
  1143. isc_info_cur_logfile_name = 36;
  1144. isc_info_cur_log_part_offset = 37;
  1145. isc_info_num_wal_buffers = 38;
  1146. isc_info_wal_buffer_size = 39;
  1147. isc_info_wal_ckpt_length = 40;
  1148. isc_info_wal_cur_ckpt_interval = 41;
  1149. isc_info_wal_prv_ckpt_fname = 42;
  1150. isc_info_wal_prv_ckpt_poffset = 43;
  1151. isc_info_wal_recv_ckpt_fname = 44;
  1152. isc_info_wal_recv_ckpt_poffset = 45;
  1153. isc_info_wal_grpc_wait_usecs = 47;
  1154. isc_info_wal_num_io = 48;
  1155. isc_info_wal_avg_io_size = 49;
  1156. isc_info_wal_num_commits = 50;
  1157. isc_info_wal_avg_grpc_size = 51;
  1158. isc_info_forced_writes = 52;
  1159. isc_info_user_names = 53;
  1160. isc_info_page_errors = 54;
  1161. isc_info_record_errors = 55;
  1162. isc_info_bpage_errors = 56;
  1163. isc_info_dpage_errors = 57;
  1164. isc_info_ipage_errors = 58;
  1165. isc_info_ppage_errors = 59;
  1166. isc_info_tpage_errors = 60;
  1167. isc_info_set_page_buffers = 61;
  1168. isc_info_db_SQL_dialect = 62;
  1169. isc_info_db_read_only = 63;
  1170. isc_info_db_size_in_pages = 64;
  1171. { }
  1172. { Database information return values }
  1173. { }
  1174. isc_info_db_impl_rdb_vms = 1;
  1175. isc_info_db_impl_rdb_eln = 2;
  1176. isc_info_db_impl_rdb_eln_dev = 3;
  1177. isc_info_db_impl_rdb_vms_y = 4;
  1178. isc_info_db_impl_rdb_eln_y = 5;
  1179. isc_info_db_impl_jri = 6;
  1180. isc_info_db_impl_jsv = 7;
  1181. isc_info_db_impl_isc_a = 25;
  1182. isc_info_db_impl_isc_u = 26;
  1183. isc_info_db_impl_isc_v = 27;
  1184. isc_info_db_impl_isc_s = 28;
  1185. isc_info_db_impl_isc_apl_68K = 25;
  1186. isc_info_db_impl_isc_vax_ultr = 26;
  1187. isc_info_db_impl_isc_vms = 27;
  1188. isc_info_db_impl_isc_sun_68k = 28;
  1189. isc_info_db_impl_isc_os2 = 29;
  1190. isc_info_db_impl_isc_sun4 = 30;
  1191. isc_info_db_impl_isc_hp_ux = 31;
  1192. isc_info_db_impl_isc_sun_386i = 32;
  1193. isc_info_db_impl_isc_vms_orcl = 33;
  1194. isc_info_db_impl_isc_mac_aux = 34;
  1195. isc_info_db_impl_isc_rt_aix = 35;
  1196. isc_info_db_impl_isc_mips_ult = 36;
  1197. isc_info_db_impl_isc_xenix = 37;
  1198. isc_info_db_impl_isc_dg = 38;
  1199. isc_info_db_impl_isc_hp_mpexl = 39;
  1200. isc_info_db_impl_isc_hp_ux68K = 40;
  1201. isc_info_db_impl_isc_sgi = 41;
  1202. isc_info_db_impl_isc_sco_unix = 42;
  1203. isc_info_db_impl_isc_cray = 43;
  1204. isc_info_db_impl_isc_imp = 44;
  1205. isc_info_db_impl_isc_delta = 45;
  1206. isc_info_db_impl_isc_next = 46;
  1207. isc_info_db_impl_isc_dos = 47;
  1208. isc_info_db_impl_isc_winnt = 48;
  1209. isc_info_db_impl_isc_epson = 49;
  1210. isc_info_db_class_access = 1;
  1211. isc_info_db_class_y_valve = 2;
  1212. isc_info_db_class_rem_int = 3;
  1213. isc_info_db_class_rem_srvr = 4;
  1214. isc_info_db_class_pipe_int = 7;
  1215. isc_info_db_class_pipe_srvr = 8;
  1216. isc_info_db_class_sam_int = 9;
  1217. isc_info_db_class_sam_srvr = 10;
  1218. isc_info_db_class_gateway = 11;
  1219. isc_info_db_class_cache = 12;
  1220. { }
  1221. { Request information items }
  1222. { }
  1223. isc_info_number_messages = 4;
  1224. isc_info_max_message = 5;
  1225. isc_info_max_send = 6;
  1226. isc_info_max_receive = 7;
  1227. isc_info_state = 8;
  1228. isc_info_message_number = 9;
  1229. isc_info_message_size = 10;
  1230. isc_info_request_cost = 11;
  1231. isc_info_access_path = 12;
  1232. isc_info_req_select_count = 13;
  1233. isc_info_req_insert_count = 14;
  1234. isc_info_req_update_count = 15;
  1235. isc_info_req_delete_count = 16;
  1236. { }
  1237. { Access path items }
  1238. { }
  1239. isc_info_rsb_end = 0;
  1240. isc_info_rsb_begin = 1;
  1241. isc_info_rsb_type = 2;
  1242. isc_info_rsb_relation = 3;
  1243. isc_info_rsb_plan = 4;
  1244. { }
  1245. { Rsb types }
  1246. { }
  1247. isc_info_rsb_unknown = 1;
  1248. isc_info_rsb_indexed = 2;
  1249. isc_info_rsb_navigate = 3;
  1250. isc_info_rsb_sequential = 4;
  1251. isc_info_rsb_cross = 5;
  1252. isc_info_rsb_sort = 6;
  1253. isc_info_rsb_first = 7;
  1254. isc_info_rsb_boolean = 8;
  1255. isc_info_rsb_union = 9;
  1256. isc_info_rsb_aggregate = 10;
  1257. isc_info_rsb_merge = 11;
  1258. isc_info_rsb_ext_sequential = 12;
  1259. isc_info_rsb_ext_indexed = 13;
  1260. isc_info_rsb_ext_dbkey = 14;
  1261. isc_info_rsb_left_cross = 15;
  1262. isc_info_rsb_select = 16;
  1263. isc_info_rsb_sql_join = 17;
  1264. isc_info_rsb_simulate = 18;
  1265. isc_info_rsb_sim_cross = 19;
  1266. isc_info_rsb_once = 20;
  1267. isc_info_rsb_procedure = 21;
  1268. { }
  1269. { Bitmap expressions }
  1270. { }
  1271. isc_info_rsb_and = 1;
  1272. isc_info_rsb_or = 2;
  1273. isc_info_rsb_dbkey = 3;
  1274. isc_info_rsb_index = 4;
  1275. isc_info_req_active = 2;
  1276. isc_info_req_inactive = 3;
  1277. isc_info_req_send = 4;
  1278. isc_info_req_receive = 5;
  1279. isc_info_req_select = 6;
  1280. isc_info_req_sql_stall = 7;
  1281. { }
  1282. { Blob information items }
  1283. { }
  1284. isc_info_blob_num_segments = 4;
  1285. isc_info_blob_max_segment = 5;
  1286. isc_info_blob_total_length = 6;
  1287. isc_info_blob_type = 7;
  1288. { }
  1289. { Transaction information items }
  1290. { }
  1291. isc_info_tra_id = 4;
  1292. {
  1293. Service action items
  1294. }
  1295. { Starts database backup process on the server }
  1296. isc_action_svc_backup = 1;
  1297. { Starts database restore process on the server }
  1298. isc_action_svc_restore = 2;
  1299. { Starts database repair process on the server }
  1300. isc_action_svc_repair = 3;
  1301. { Adds a new user to the security database }
  1302. isc_action_svc_add_user = 4;
  1303. { Deletes a user record from the security database }
  1304. isc_action_svc_delete_user = 5;
  1305. { Modifies a user record in the security database }
  1306. isc_action_svc_modify_user = 6;
  1307. { Displays a user record from the security database }
  1308. isc_action_svc_display_user = 7;
  1309. { Sets database properties }
  1310. isc_action_svc_properties = 8;
  1311. { Adds a license to the license file }
  1312. isc_action_svc_add_license = 9;
  1313. { Removes a license from the license file }
  1314. isc_action_svc_remove_license = 10;
  1315. { Retrieves database statistics }
  1316. isc_action_svc_db_stats = 11;
  1317. { Retrieves the InterBase log file from the server }
  1318. isc_action_svc_get_ib_log = 12;
  1319. {
  1320. Service information items
  1321. }
  1322. { Retrieves the number of attachments and databases }
  1323. isc_info_svc_svr_db_info = 50;
  1324. { Retrieves all license keys and IDs from the license file }
  1325. isc_info_svc_get_license = 51;
  1326. { Retrieves a bitmask representing licensed options on the server }
  1327. isc_info_svc_get_license_mask = 52;
  1328. { Retrieves the parameters and values for IB_CONFIG }
  1329. isc_info_svc_get_config = 53;
  1330. { Retrieves the version of the services manager }
  1331. isc_info_svc_version = 54;
  1332. { Retrieves the version of the InterBase server }
  1333. isc_info_svc_server_version = 55;
  1334. { Retrieves the implementation of the InterBase server }
  1335. isc_info_svc_implementation = 56;
  1336. { Retrieves a bitmask representing the server's capabilities }
  1337. isc_info_svc_capabilities = 57;
  1338. { Retrieves the path to the security database in use by the server }
  1339. isc_info_svc_user_dbpath = 58;
  1340. { Retrieves the setting of $INTERBASE }
  1341. isc_info_svc_get_env = 59;
  1342. { Retrieves the setting of $INTERBASE_LCK }
  1343. isc_info_svc_get_env_lock = 60;
  1344. { Retrieves the setting of $INTERBASE_MSG }
  1345. isc_info_svc_get_env_msg = 61;
  1346. { Retrieves 1 line of service output per call }
  1347. isc_info_svc_line = 62;
  1348. { Retrieves as much of the server output as will fit in the supplied buffer }
  1349. isc_info_svc_to_eof = 63;
  1350. { Sets / signifies a timeout value for reading service information }
  1351. isc_info_svc_timeout = 64;
  1352. { Retrieves the number of users licensed for accessing the server }
  1353. isc_info_svc_get_licensed_users = 65;
  1354. { Retrieve the limbo transactions }
  1355. isc_info_svc_limbo_trans = 66;
  1356. { Checks to see if a service is running on an attachment }
  1357. isc_info_svc_running = 67;
  1358. { Returns the user information from isc_action_svc_display_users }
  1359. isc_info_svc_get_users = 68;
  1360. {
  1361. Parameters for isc_action_(add|delete|modify)_user
  1362. }
  1363. isc_spb_sec_userid = 5;
  1364. isc_spb_sec_groupid = 6;
  1365. isc_spb_sec_username = 7;
  1366. isc_spb_sec_password = 8;
  1367. isc_spb_sec_groupname = 9;
  1368. isc_spb_sec_firstname = 10;
  1369. isc_spb_sec_middlename = 11;
  1370. isc_spb_sec_lastname = 12;
  1371. {
  1372. Parameters for isc_action_svc_(add|remove)_license,
  1373. isc_info_svc_get_license
  1374. }
  1375. isc_spb_lic_key = 5;
  1376. isc_spb_lic_id = 6;
  1377. isc_spb_lic_desc = 7;
  1378. {
  1379. Parameters for isc_action_svc_backup
  1380. }
  1381. isc_spb_bkp_file = 5;
  1382. isc_spb_bkp_factor = 6;
  1383. isc_spb_bkp_length = 7;
  1384. isc_spb_bkp_ignore_checksums = $01;
  1385. isc_spb_bkp_ignore_limbo = $02;
  1386. isc_spb_bkp_metadata_only = $04;
  1387. isc_spb_bkp_no_garbage_collect = $08;
  1388. isc_spb_bkp_old_descriptions = $10;
  1389. isc_spb_bkp_non_transportable = $20;
  1390. isc_spb_bkp_convert = $40;
  1391. isc_spb_bkp_expand = $80;
  1392. {
  1393. Parameters for isc_action_svc_properties
  1394. }
  1395. isc_spb_prp_page_buffers = 5;
  1396. isc_spb_prp_sweep_interval = 6;
  1397. isc_spb_prp_shutdown_db = 7;
  1398. isc_spb_prp_deny_new_attachments = 9;
  1399. isc_spb_prp_deny_new_transactions = 10;
  1400. isc_spb_prp_reserve_space = 11;
  1401. isc_spb_prp_write_mode = 12;
  1402. isc_spb_prp_access_mode = 13;
  1403. isc_spb_prp_set_sql_dialect = 14;
  1404. isc_spb_prp_activate = $0100;
  1405. isc_spb_prp_db_online = $0200;
  1406. {
  1407. Parameters for isc_spb_prp_reserve_space
  1408. }
  1409. isc_spb_prp_res_use_full = 35;
  1410. isc_spb_prp_res = 36;
  1411. {
  1412. Parameters for isc_spb_prp_write_mode
  1413. }
  1414. isc_spb_prp_wm_async = 37;
  1415. isc_spb_prp_wm_sync = 38;
  1416. {
  1417. Parameters for isc_spb_prp_access_mode
  1418. }
  1419. isc_spb_prp_am_readonly = 39;
  1420. isc_spb_prp_am_readwrite = 40;
  1421. {
  1422. Parameters for isc_action_svc_repair
  1423. }
  1424. isc_spb_rpr_commit_trans = 15;
  1425. isc_spb_rpr_rollback_trans = 34;
  1426. isc_spb_rpr_recover_two_phase = 17;
  1427. isc_spb_tra_id = 18;
  1428. isc_spb_single_tra_id = 19;
  1429. isc_spb_multi_tra_id = 20;
  1430. isc_spb_tra_state = 21;
  1431. isc_spb_tra_state_limbo = 22;
  1432. isc_spb_tra_state_commit = 23;
  1433. isc_spb_tra_state_rollback = 24;
  1434. isc_spb_tra_state_unknown = 25;
  1435. isc_spb_tra_host_site = 26;
  1436. isc_spb_tra_remote_site = 27;
  1437. isc_spb_tra_db_path = 28;
  1438. isc_spb_tra_advise = 29;
  1439. isc_spb_tra_advise_commit = 30;
  1440. isc_spb_tra_advise_rollback = 31;
  1441. isc_spb_tra_advise_unknown = 33;
  1442. isc_spb_rpr_validate_db = $01;
  1443. isc_spb_rpr_sweep_db = $02;
  1444. isc_spb_rpr_mend_db = $04;
  1445. isc_spb_rpr_list_limbo_trans = $08;
  1446. isc_spb_rpr_check_db = $10;
  1447. isc_spb_rpr_ignore_checksum = $20;
  1448. isc_spb_rpr_kill_shadows = $40;
  1449. isc_spb_rpr_full = $80;
  1450. {
  1451. Parameters for isc_action_svc_restore
  1452. }
  1453. isc_spb_res_buffers = 9;
  1454. isc_spb_res_page_size = 10;
  1455. isc_spb_res_length = 11;
  1456. isc_spb_res_access_mode = 12;
  1457. isc_spb_res_deactivate_idx = $0100;
  1458. isc_spb_res_no_shadow = $0200;
  1459. isc_spb_res_no_validity = $0400;
  1460. isc_spb_res_one_at_a_time = $0800;
  1461. isc_spb_res_replace = $1000;
  1462. isc_spb_res_create = $2000;
  1463. isc_spb_res_use_all_space = $4000;
  1464. {
  1465. Parameters for isc_spb_res_access_mode
  1466. }
  1467. isc_spb_res_am_readonly = isc_spb_prp_am_readonly;
  1468. isc_spb_res_am_readwrite = isc_spb_prp_am_readwrite;
  1469. {
  1470. Parameters for isc_info_svc_svr_db_info
  1471. }
  1472. isc_spb_num_att = 5;
  1473. isc_spb_num_db = 6;
  1474. {
  1475. Parameters for isc_info_svc_db_stats
  1476. }
  1477. isc_spb_sts_data_pages = $01;
  1478. isc_spb_sts_db_log = $02;
  1479. isc_spb_sts_hdr_pages = $04;
  1480. isc_spb_sts_idx_pages = $08;
  1481. isc_spb_sts_sys_relations = $10;
  1482. { }
  1483. { SQL information items }
  1484. { }
  1485. isc_info_sql_select = 4;
  1486. isc_info_sql_bind = 5;
  1487. isc_info_sql_num_variables = 6;
  1488. isc_info_sql_describe_vars = 7;
  1489. isc_info_sql_describe_end = 8;
  1490. isc_info_sql_sqlda_seq = 9;
  1491. isc_info_sql_message_seq = 10;
  1492. isc_info_sql_type = 11;
  1493. isc_info_sql_sub_type = 12;
  1494. isc_info_sql_scale = 13;
  1495. isc_info_sql_length = 14;
  1496. isc_info_sql_null_ind = 15;
  1497. isc_info_sql_field = 16;
  1498. isc_info_sql_relation = 17;
  1499. isc_info_sql_owner = 18;
  1500. isc_info_sql_alias = 19;
  1501. isc_info_sql_sqlda_start = 20;
  1502. isc_info_sql_stmt_type = 21;
  1503. isc_info_sql_get_plan = 22;
  1504. isc_info_sql_records = 23;
  1505. isc_info_sql_batch_fetch = 24;
  1506. { }
  1507. { SQL information return values }
  1508. { }
  1509. isc_info_sql_stmt_select = 1;
  1510. isc_info_sql_stmt_insert = 2;
  1511. isc_info_sql_stmt_update = 3;
  1512. isc_info_sql_stmt_delete = 4;
  1513. isc_info_sql_stmt_ddl = 5;
  1514. isc_info_sql_stmt_get_segment = 6;
  1515. isc_info_sql_stmt_put_segment = 7;
  1516. isc_info_sql_stmt_exec_procedure = 8;
  1517. isc_info_sql_stmt_start_trans = 9;
  1518. isc_info_sql_stmt_commit = 10;
  1519. isc_info_sql_stmt_rollback = 11;
  1520. isc_info_sql_stmt_select_for_upd = 12;
  1521. isc_info_sql_stmt_set_generator = 13;
  1522. { }
  1523. { Server configuration key values }
  1524. { }
  1525. ISCCFG_LOCKMEM_KEY = 0;
  1526. ISCCFG_LOCKSEM_KEY = 1;
  1527. ISCCFG_LOCKSIG_KEY = 2;
  1528. ISCCFG_EVNTMEM_KEY = 3;
  1529. ISCCFG_DBCACHE_KEY = 4;
  1530. ISCCFG_PRIORITY_KEY = 5;
  1531. ISCCFG_IPCMAP_KEY = 6;
  1532. ISCCFG_MEMMIN_KEY = 7;
  1533. ISCCFG_MEMMAX_KEY = 8;
  1534. ISCCFG_LOCKORDER_KEY = 9;
  1535. ISCCFG_ANYLOCKMEM_KEY = 10;
  1536. ISCCFG_ANYLOCKSEM_KEY = 11;
  1537. ISCCFG_ANYLOCKSIG_KEY = 12;
  1538. ISCCFG_ANYEVNTMEM_KEY = 13;
  1539. ISCCFG_LOCKHASH_KEY = 14;
  1540. ISCCFG_DEADLOCK_KEY = 15;
  1541. ISCCFG_LOCKSPIN_KEY = 16;
  1542. ISCCFG_CONN_TIMEOUT_KEY = 17;
  1543. ISCCFG_DUMMY_INTRVL_KEY = 18;
  1544. { Internal Use only }
  1545. ISCCFG_TRACE_POOLS_KEY = 19;
  1546. ISCCFG_REMOTE_BUFFER_KEY = 20;
  1547. { }
  1548. { Error codes }
  1549. { }
  1550. isc_facility = 20;
  1551. isc_err_base = 335544320;
  1552. isc_err_factor = 1;
  1553. isc_arg_end = 0;
  1554. isc_arg_gds = 1;
  1555. isc_arg_string = 2;
  1556. isc_arg_cstring = 3;
  1557. isc_arg_number = 4;
  1558. isc_arg_interpreted = 5;
  1559. isc_arg_vms = 6;
  1560. isc_arg_unix = 7;
  1561. isc_arg_domain = 8;
  1562. isc_arg_dos = 9;
  1563. isc_arg_mpexl = 10;
  1564. isc_arg_mpexl_ipc = 11;
  1565. isc_arg_next_mach = 15;
  1566. isc_arg_netware = 16;
  1567. isc_arg_win32 = 17;
  1568. isc_arg_warning = 18;
  1569. { }
  1570. { Dynamic Data Definition Language operators }
  1571. { }
  1572. { }
  1573. { Version number }
  1574. { }
  1575. const
  1576. isc_dyn_version_1 = 1;
  1577. isc_dyn_eoc = 255;
  1578. { }
  1579. { Operations (may be nested) }
  1580. { }
  1581. isc_dyn_begin = 2;
  1582. isc_dyn_end = 3;
  1583. isc_dyn_if = 4;
  1584. isc_dyn_def_database = 5;
  1585. isc_dyn_def_global_fld = 6;
  1586. isc_dyn_def_local_fld = 7;
  1587. isc_dyn_def_idx = 8;
  1588. isc_dyn_def_rel = 9;
  1589. isc_dyn_def_sql_fld = 10;
  1590. isc_dyn_def_view = 12;
  1591. isc_dyn_def_trigger = 15;
  1592. isc_dyn_def_security_class = 120;
  1593. isc_dyn_def_dimension = 140;
  1594. isc_dyn_def_generator = 24;
  1595. isc_dyn_def_function = 25;
  1596. isc_dyn_def_filter = 26;
  1597. isc_dyn_def_function_arg = 27;
  1598. isc_dyn_def_shadow = 34;
  1599. isc_dyn_def_trigger_msg = 17;
  1600. isc_dyn_def_file = 36;
  1601. isc_dyn_mod_database = 39;
  1602. isc_dyn_mod_rel = 11;
  1603. isc_dyn_mod_global_fld = 13;
  1604. isc_dyn_mod_idx = 102;
  1605. isc_dyn_mod_local_fld = 14;
  1606. isc_dyn_mod_sql_fld = 216;
  1607. isc_dyn_mod_view = 16;
  1608. isc_dyn_mod_security_class = 122;
  1609. isc_dyn_mod_trigger = 113;
  1610. isc_dyn_mod_trigger_msg = 28;
  1611. isc_dyn_delete_database = 18;
  1612. isc_dyn_delete_rel = 19;
  1613. isc_dyn_delete_global_fld = 20;
  1614. isc_dyn_delete_local_fld = 21;
  1615. isc_dyn_delete_idx = 22;
  1616. isc_dyn_delete_security_class = 123;
  1617. isc_dyn_delete_dimensions = 143;
  1618. isc_dyn_delete_trigger = 23;
  1619. isc_dyn_delete_trigger_msg = 29;
  1620. isc_dyn_delete_filter = 32;
  1621. isc_dyn_delete_function = 33;
  1622. isc_dyn_delete_shadow = 35;
  1623. isc_dyn_grant = 30;
  1624. isc_dyn_revoke = 31;
  1625. isc_dyn_def_primary_key = 37;
  1626. isc_dyn_def_foreign_key = 38;
  1627. isc_dyn_def_unique = 40;
  1628. isc_dyn_def_procedure = 164;
  1629. isc_dyn_delete_procedure = 165;
  1630. isc_dyn_def_parameter = 135;
  1631. isc_dyn_delete_parameter = 136;
  1632. isc_dyn_mod_procedure = 175;
  1633. isc_dyn_def_log_file = 176;
  1634. isc_dyn_def_cache_file = 180;
  1635. isc_dyn_def_exception = 181;
  1636. isc_dyn_mod_exception = 182;
  1637. isc_dyn_del_exception = 183;
  1638. isc_dyn_drop_log = 194;
  1639. isc_dyn_drop_cache = 195;
  1640. isc_dyn_def_default_log = 202;
  1641. { }
  1642. { View specific stuff }
  1643. { }
  1644. isc_dyn_view_blr = 43;
  1645. isc_dyn_view_source = 44;
  1646. isc_dyn_view_relation = 45;
  1647. isc_dyn_view_context = 46;
  1648. isc_dyn_view_context_name = 47;
  1649. { }
  1650. { Generic attributes }
  1651. { }
  1652. isc_dyn_rel_name = 50;
  1653. isc_dyn_fld_name = 51;
  1654. isc_dyn_new_fld_name = 215;
  1655. isc_dyn_idx_name = 52;
  1656. isc_dyn_description = 53;
  1657. isc_dyn_security_class = 54;
  1658. isc_dyn_system_flag = 55;
  1659. isc_dyn_update_flag = 56;
  1660. isc_dyn_prc_name = 166;
  1661. isc_dyn_prm_name = 137;
  1662. isc_dyn_sql_object = 196;
  1663. isc_dyn_fld_character_set_name = 174;
  1664. { }
  1665. { Relation specific attributes }
  1666. { }
  1667. isc_dyn_rel_dbkey_length = 61;
  1668. isc_dyn_rel_store_trig = 62;
  1669. isc_dyn_rel_modify_trig = 63;
  1670. isc_dyn_rel_erase_trig = 64;
  1671. isc_dyn_rel_store_trig_source = 65;
  1672. isc_dyn_rel_modify_trig_source = 66;
  1673. isc_dyn_rel_erase_trig_source = 67;
  1674. isc_dyn_rel_ext_file = 68;
  1675. isc_dyn_rel_sql_protection = 69;
  1676. isc_dyn_rel_constraint = 162;
  1677. isc_dyn_delete_rel_constraint = 163;
  1678. { }
  1679. { Global field specific attributes }
  1680. { }
  1681. isc_dyn_fld_type = 70;
  1682. isc_dyn_fld_length = 71;
  1683. isc_dyn_fld_scale = 72;
  1684. isc_dyn_fld_sub_type = 73;
  1685. isc_dyn_fld_segment_length = 74;
  1686. isc_dyn_fld_query_header = 75;
  1687. isc_dyn_fld_edit_string = 76;
  1688. isc_dyn_fld_validation_blr = 77;
  1689. isc_dyn_fld_validation_source = 78;
  1690. isc_dyn_fld_computed_blr = 79;
  1691. isc_dyn_fld_computed_source = 80;
  1692. isc_dyn_fld_missing_value = 81;
  1693. isc_dyn_fld_default_value = 82;
  1694. isc_dyn_fld_query_name = 83;
  1695. isc_dyn_fld_dimensions = 84;
  1696. isc_dyn_fld_not_null = 85;
  1697. isc_dyn_fld_precision = 86;
  1698. isc_dyn_fld_char_length = 172;
  1699. isc_dyn_fld_collation = 173;
  1700. isc_dyn_fld_default_source = 193;
  1701. isc_dyn_del_default = 197;
  1702. isc_dyn_del_validation = 198;
  1703. isc_dyn_single_validation = 199;
  1704. isc_dyn_fld_character_set = 203;
  1705. { }
  1706. { Local field specific attributes }
  1707. { }
  1708. isc_dyn_fld_source = 90;
  1709. isc_dyn_fld_base_fld = 91;
  1710. isc_dyn_fld_position = 92;
  1711. isc_dyn_fld_update_flag = 93;
  1712. { }
  1713. { Index specific attributes }
  1714. { }
  1715. isc_dyn_idx_unique = 100;
  1716. isc_dyn_idx_inactive = 101;
  1717. isc_dyn_idx_type = 103;
  1718. isc_dyn_idx_foreign_key = 104;
  1719. isc_dyn_idx_ref_column = 105;
  1720. isc_dyn_idx_statistic = 204;
  1721. { }
  1722. { Trigger specific attributes }
  1723. { }
  1724. isc_dyn_trg_type = 110;
  1725. isc_dyn_trg_blr = 111;
  1726. isc_dyn_trg_source = 112;
  1727. isc_dyn_trg_name = 114;
  1728. isc_dyn_trg_sequence = 115;
  1729. isc_dyn_trg_inactive = 116;
  1730. isc_dyn_trg_msg_number = 117;
  1731. isc_dyn_trg_msg = 118;
  1732. { }
  1733. { Security Class specific attributes }
  1734. { }
  1735. isc_dyn_scl_acl = 121;
  1736. isc_dyn_grant_user = 130;
  1737. isc_dyn_grant_proc = 186;
  1738. isc_dyn_grant_trig = 187;
  1739. isc_dyn_grant_view = 188;
  1740. isc_dyn_grant_options = 132;
  1741. isc_dyn_grant_user_group = 205;
  1742. { }
  1743. { Dimension specific information }
  1744. { }
  1745. isc_dyn_dim_lower = 141;
  1746. isc_dyn_dim_upper = 142;
  1747. { }
  1748. { File specific attributes }
  1749. { }
  1750. isc_dyn_file_name = 125;
  1751. isc_dyn_file_start = 126;
  1752. isc_dyn_file_length = 127;
  1753. isc_dyn_shadow_number = 128;
  1754. isc_dyn_shadow_man_auto = 129;
  1755. isc_dyn_shadow_conditional = 130;
  1756. { }
  1757. { Log file specific attributes }
  1758. { }
  1759. isc_dyn_log_file_sequence = 177;
  1760. isc_dyn_log_file_partitions = 178;
  1761. isc_dyn_log_file_serial = 179;
  1762. isc_dyn_log_file_overflow = 200;
  1763. isc_dyn_log_file_raw = 201;
  1764. { }
  1765. { Log specific attributes }
  1766. { }
  1767. isc_dyn_log_group_commit_wait = 189;
  1768. isc_dyn_log_buffer_size = 190;
  1769. isc_dyn_log_check_point_length = 191;
  1770. isc_dyn_log_num_of_buffers = 192;
  1771. { }
  1772. { Function specific attributes }
  1773. { }
  1774. isc_dyn_function_name = 145;
  1775. isc_dyn_function_type = 146;
  1776. isc_dyn_func_module_name = 147;
  1777. isc_dyn_func_entry_point = 148;
  1778. isc_dyn_func_return_argument = 149;
  1779. isc_dyn_func_arg_position = 150;
  1780. isc_dyn_func_mechanism = 151;
  1781. isc_dyn_filter_in_subtype = 152;
  1782. isc_dyn_filter_out_subtype = 153;
  1783. isc_dyn_description2 = 154;
  1784. isc_dyn_fld_computed_source2 = 155;
  1785. isc_dyn_fld_edit_string2 = 156;
  1786. isc_dyn_fld_query_header2 = 157;
  1787. isc_dyn_fld_validation_source2 = 158;
  1788. isc_dyn_trg_msg2 = 159;
  1789. isc_dyn_trg_source2 = 160;
  1790. isc_dyn_view_source2 = 161;
  1791. isc_dyn_xcp_msg2 = 184;
  1792. { }
  1793. { Generator specific attributes }
  1794. { }
  1795. isc_dyn_generator_name = 95;
  1796. isc_dyn_generator_id = 96;
  1797. { }
  1798. { Procedure specific attributes }
  1799. { }
  1800. isc_dyn_prc_inputs = 167;
  1801. isc_dyn_prc_outputs = 168;
  1802. isc_dyn_prc_source = 169;
  1803. isc_dyn_prc_blr = 170;
  1804. isc_dyn_prc_source2 = 171;
  1805. { }
  1806. { Parameter specific attributes }
  1807. { }
  1808. isc_dyn_prm_number = 138;
  1809. isc_dyn_prm_type = 139;
  1810. { }
  1811. { Relation specific attributes }
  1812. { }
  1813. isc_dyn_xcp_msg = 185;
  1814. { }
  1815. { Cascading referential integrity values }
  1816. { }
  1817. isc_dyn_foreign_key_update = 205;
  1818. isc_dyn_foreign_key_delete = 206;
  1819. isc_dyn_foreign_key_cascade = 207;
  1820. isc_dyn_foreign_key_default = 208;
  1821. isc_dyn_foreign_key_null = 209;
  1822. isc_dyn_foreign_key_none = 210;
  1823. { }
  1824. { SQL role values }
  1825. { }
  1826. isc_dyn_def_sql_role = 211;
  1827. isc_dyn_sql_role_name = 212;
  1828. isc_dyn_grant_admin_options = 213;
  1829. isc_dyn_del_sql_role = 214;
  1830. { }
  1831. { Last $dyn value assigned }
  1832. { }
  1833. isc_dyn_last_dyn_value = 216;
  1834. { }
  1835. { Array slice description language (SDL) }
  1836. { }
  1837. isc_sdl_version1 = 1;
  1838. isc_sdl_eoc = 255;
  1839. isc_sdl_relation = 2;
  1840. isc_sdl_rid = 3;
  1841. isc_sdl_field = 4;
  1842. isc_sdl_fid = 5;
  1843. isc_sdl_struct = 6;
  1844. isc_sdl_variable = 7;
  1845. isc_sdl_scalar = 8;
  1846. isc_sdl_tiny_integer = 9;
  1847. isc_sdl_short_integer = 10;
  1848. isc_sdl_long_integer = 11;
  1849. isc_sdl_literal = 12;
  1850. isc_sdl_add = 13;
  1851. isc_sdl_subtract = 14;
  1852. isc_sdl_multiply = 15;
  1853. isc_sdl_divide = 16;
  1854. isc_sdl_negate = 17;
  1855. isc_sdl_eql = 18;
  1856. isc_sdl_neq = 19;
  1857. isc_sdl_gtr = 20;
  1858. isc_sdl_geq = 21;
  1859. isc_sdl_lss = 22;
  1860. isc_sdl_leq = 23;
  1861. isc_sdl_and = 24;
  1862. isc_sdl_or = 25;
  1863. isc_sdl_not = 26;
  1864. isc_sdl_while = 27;
  1865. isc_sdl_assignment = 28;
  1866. isc_sdl_label = 29;
  1867. isc_sdl_leave = 30;
  1868. isc_sdl_begin = 31;
  1869. isc_sdl_end = 32;
  1870. isc_sdl_do3 = 33;
  1871. isc_sdl_do2 = 34;
  1872. isc_sdl_do1 = 35;
  1873. isc_sdl_element = 36;
  1874. { }
  1875. { International text interpretation values }
  1876. { }
  1877. isc_interp_eng_ascii = 0;
  1878. isc_interp_jpn_sjis = 5;
  1879. isc_interp_jpn_euc = 6;
  1880. { }
  1881. { SQL definitions }
  1882. { }
  1883. SQL_TEXT = 452;
  1884. SQL_VARYING = 448;
  1885. SQL_SHORT = 500;
  1886. SQL_LONG = 496;
  1887. SQL_FLOAT = 482;
  1888. SQL_DOUBLE = 480;
  1889. SQL_D_FLOAT = 530;
  1890. SQL_TIMESTAMP = 510;
  1891. SQL_BLOB = 520;
  1892. SQL_ARRAY = 540;
  1893. SQL_QUAD = 550;
  1894. SQL_TYPE_TIME = 560;
  1895. SQL_TYPE_DATE = 570;
  1896. SQL_INT64 = 580;
  1897. { Historical alias for pre V6 applications }
  1898. SQL_DATE = SQL_TIMESTAMP;
  1899. { }
  1900. { Blob Subtypes }
  1901. { }
  1902. { types less than zero are reserved for customer use }
  1903. isc_blob_untyped = 0;
  1904. { internal subtypes }
  1905. isc_blob_text = 1;
  1906. isc_blob_blr = 2;
  1907. isc_blob_acl = 3;
  1908. isc_blob_ranges = 4;
  1909. isc_blob_summary = 5;
  1910. isc_blob_format = 6;
  1911. isc_blob_tra = 7;
  1912. isc_blob_extfile = 8;
  1913. { the range 20-30 is reserved for dBASE and Paradox types }
  1914. isc_blob_formatted_memo = 20;
  1915. isc_blob_paradox_ole = 21;
  1916. isc_blob_graphic = 22;
  1917. isc_blob_dbase_ole = 23;
  1918. isc_blob_typed_binary = 24;
  1919. implementation
  1920. function XSQLDA_LENGTH(n: Integer): Integer;
  1921. begin
  1922. Result := SizeOf(XSQLDA) + (n - 1) * SizeOf(XSQLVAR);
  1923. end;
  1924. end.
  1925. {
  1926. $Log$
  1927. Revision 1.2 2002-09-07 15:42:52 peter
  1928. * old logs removed and tabs fixed
  1929. Revision 1.1 2002/01/29 17:54:51 peter
  1930. * splitted to base and extra
  1931. }