meta data for this page
IBEScript.dll
IBEScript.dll can be used in applications to execute scripts from file or from a string buffer. There is a small demo application illustrating its use in the /IBEScriptDll folder. Please also refer to the IBEScriptDll Readme.txt. (This feature is unfortunately not included in the free IBExpert Personal Edition.)
For regulations regarding distribution of any of the IBExpert Server Tools modules (hkSCC.exe, ibescript.exe, ibescript.dll and fbcrypt) together with your application, please refer to the IBExpert Server Tools documentation contents page.
New interface functions were implemented in IBExpert version 2020.09.21 to allow user applications to communicate with IBEBlocks:
- Set IBEBlock parameters from user application.
- Get IBEBlock output values.
- Perform user callback in any place of IBEBlock code passing data from within a block and returning user data back to a block.
Details can be found in the IBEBlock documentation: IBEScript.dll interface & callback functions
IBEScriptDll Readme.txt
1. IBEScript.dll exports the following functions:
- ExecScriptFile: executes a script from a file.
- ExecScriptText: executes a script from a string buffer.
- CONNECT: connects to the database if there is no CONNECT statement in the script.
2. Examples of the use of ExecScriptFile and ExecScriptText: see demo application in the /IBEScriptDll folder.
3. Example using the CONNECT function:
procedure TForm1.Button2Click(Sender: TObject); var Hndl : THandle; ESP : TExecuteScriptProc; CP : TConnectDBProc; s : string; Res : integer; begin ErrCount := 0; StmtCount := 0; mLog.Lines.Clear; s := mScript.Text; if Trim(s) = '' then begin ShowMessage('Nothing to do!'); Exit; end; try Hndl := LoadLibrary(PChar('IBEScript.dll')); if (Hndl > HINSTANCE_ERROR) then begin ESP := GetProcAddress(Hndl, 'ExecScriptText'); CP := GetProcAddress(Hndl, 'Connect'); if (@ESP <> nil) and (@CP <> nil) then begin Pages.ActivePage := tsOutput; Res := CP(PChar('db_name=localhost:c:\empty.fdb; password=masterkey; user_name=SYSDBA;' + 'lc_ctype=win1251; sql_role_name=ADMIN; sql_dialect=3;' + 'clientlib="c:\program files\firebird\bin\fbclient.dll"'), @CEH); if Res = 0 then ESP(PChar(s), @HandleError, @BeforeExec, @AfterExec); end; end; finally if Hndl > HINSTANCE_ERROR then FreeLibrary(Hndl); end; end;
This product can be purchased as part of the distribution software listed above.