ibase60.pp 80 KB

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