Using main( )

You can invoke the main( ) method from a jConnect command line as follows:

java JDBCExamples  

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:


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