Hi -
You will probably need to use the ISQL.EXE tool that ships with Interbase. Its a command line utility for interacting with Interbase Databases.
Here is an exampke of its use I came across..
...
...IF you're working in Windows ( or DOS... scary! ) here's
a batch file that can create a script:
Include everything between the dashed lines name it
it CREATE_SQL.BAT
------------------------------------------------------
@echo off
rem start bat
if %1.==. goto HELPBAT
if %2.==. goto HELPBAT
echo CONNECT 'C:\PROJECTS\test.GDB' >curr_script.sql
echo USER 'SYSDBA' PASSWORD 'masterkey'; >>curr_script.sql
echo. >>curr_script.sql
echo OUTPUT "%1"; >>curr_script.sql
if %2.==. goto ARGSDONE
echo SELECT Select * from table1 where field like "%2"; >>curr_script.sql
if %3.==. goto ARGSDONE
echo SELECT Select * from table1 where field like "%3"; >>curr_script.sql
if %4.==. goto ARGSDONE
echo SELECT Select * from table1 where field like "%4"; >>curr_script.sql
if %5.==. goto ARGSDONE
echo SELECT Select * from table1 where field like "%5"; >>curr_script.sql
if %6.==. goto ARGSDONE
echo SELECT Select * from table1 where field like "%6"; >>curr_script.sql
if %7.==. goto ARGSDONE
echo SELECT Select * from table1 where field like "%7"; >>curr_script.sql
:ARGSDONE
echo. >>curr_script.sql
echo COMMIT; >>curr_script.sql
GOTO ENDBAT
:HELPBAT
Echo.
echo Create SQL batch file
echo.
echo creates an interbase script based on command line parameters.
echo.
echo USAGE:
echo create_sql ouputfile field1 [ field2 .. field7 ]
echo
:ENDBAT
-----------------------------------------------------
simply run:
create_sql ouputfile.txt curly larry moe
to create the script:
----------------------------------------------------
CONNECT 'C:\PROJECTS\test.GDB'
USER 'SYSDBA' PASSWORD 'masterkey';
OUTPUT "outputfile.txt";
SELECT Select * from table1 where field like "curly";
SELECT Select * from table1 where field like "larry";
SELECT Select * from table1 where field like "moe";
COMMIT;
----------------------------------------------------
and run it:
isql -i curr_script.sql
note: curr_script.sql gets overwritten on every pass.
IMPORTANT: It looks like word-wrapping may damage the batch file... let me know, and I'll try to email it to you..
IF you are not using Windows, it probably wouldn't be too hard to do this in PHP or something like that.
Not checked out this script myself, but looks fairly comprehensive as you can pass parameters to the script and define output file from command line. Author was someone calling himself vogonPoet (credit where credit due and all.)
Opp.