The command line looks like:
dbisql -c "uid=dba;pwd=sql;dbf=D:\Temp\%1\meteroneany.db"
D:\Temp\subscribe.sql
I call a .bat file and pass the %1 parameter to the dbisql
command line. The %1 parameter is the mluser I wish to
subscribe. The dbisql command also calls the subscribe.sql
file.
The subscribe.sql looks like:
parameters mluser;
create synchronization user {mluser}
create synchronization subscription to meteroneremote
for {mluser}
Currently I have to manually enter the mluser parameter.
Is there a way to pass the %1 parameter to the subscribe.sql
automatically?
"%ASANY8%\win32\dbisql.exe" -c "ENG=test;DBN=test;UID=dba;PWD=sql"
READ dbisql_read_parameters.sql [Hello, World!]
Here is the dbisql_read_parameters.sql file:
-----
PARAMETERS @message;
MESSAGE '(to console) The @message parameter contains "{@message}".'
TO CONSOLE;
MESSAGE '(to client) The @message parameter contains "{@message}".' TO
CLIENT;
-----
Read about these statements in the Help: READ and PARAMETERS. And
MESSAGE if you want, it's a great debugging tool.
It is straight string substitution without much regard for the
context, as you can see from the parameter reference embedded inside a
string literal.
Pay close attention to the [] and {} bracketing. The @-sign is not
required, it is just my convention for all variable names as opposed
to column names inside SQL scripts.
Breck
bca...@risingroad.com
Mobile and Distributed Enterprise Database Applications
www.risingroad.com