You can invoke the main( ) method from a jConnect command line as follows:
java JDBCExamples “server-name:port-number?user=user-name&password=password” action
You can determine server-name and port-number from your interfaces file, using the dsedit tool. user-name and password are your user name and password. If you omit &password=password, the default is the empty password. Here are two examples:
“antibes:4000?user=smith&password=1x2x3”
“antibes:4000?user=sa”
Make sure that you enclose the parameter in quotation marks.
The action parameter can be create table, create procedure, insert, select, update, or call. It is case insensitive.
You can invoke JDBCExamples from a jConnect command line to create the table xmp and the stored procedure inoutproc as follows:
java JDBCExamples “antibes:4000?user=sa” CreateTable
java JDBCExamples “antibes:4000?user=sa” CreateProc
You can invoke JDBCExamples for insert, select, update, and call actions as follows:
java JDBCExamples “antibes:4000?user=sa” insert
java JDBCExamples “antibes:4000?user=sa” update
java JDBCExamples “antibes:4000?user=sa” call
java JDBCExamples “antibes:4000?user=sa” select
These invocations display the message “Action performed.”
To drop the table xmp and the stored procedure inoutproc, enter:
java JDBCExamples “antibes:4000?user=sa” droptable
java JDBCExamples “antibes:4000?user=sa” dropproc