ij Commands and Errors Reference,
Page 10 of 37


[top]
[prev]
[next]
Documentation Top
Index for This Book

Absolute
After Last
Async
Autocommit
Before First
Close
Commit
Connect
Disconnect
Driver
Elapsedtime
Execute
Exit
First
Get Cursor
Get Scroll Insensitive Cursor
Help
Last
MaximumDisplayWidth
Next
Prepare
Previous
Protocol
Readonly
Relative
Remove
Rollback
Run
Set Connection
Show Connections
Wait For

Connect

Syntax

CONNECT String [ PROTOCOL Identifier ] [ AS Identifier ] [ USER String PASSWORD String ]

Description

Takes the value of the string database connection URL and issues a java.sql.DriverManager.getConnection request to set the current connection to that database connection URL.

You have the option of specifying a name for your connection. Use the Set Connection command to switch between connections. If you do not name a connection, the system generates a name automatically.

You also have the option of specifying a named protocol previously created with the Protocol command or the ij.protocol.protocolName property.

If the connection requires a user name and password, supply those with the optional user and password parameters.

NEW: The ability to supply a user name and password as parameters to the Connect command is new in Version 3.0.

If the connect succeeds, the connection becomes the current one and ij displays a new prompt for the Next command. If you have more than one open connection, the name of the connection appears in the prompt.

All further commands are processed against the new connection.

Example

 ij> connect 'jdbc:cloudscape:menuDB;create=true';
 ij> -- we create a new table in menuDB: 
 CREATE TABLE menu(course CHAR(10), item CHAR(20), price INTEGER);
 0 rows inserted/updated/deleted
 ij> protocol 'jdbc:cloudscape:';
 ij> connect 'toursDB;autocommit=false' as tours1;
 ij> connect 'newDB;create=true' as newDB;
 NEWDB> show connections;
 TOURS1 -    jdbc:cloudscape:toursDB;autocommit=false
 NEWDB* -    jdbc:cloudscape:newDB;create=true
 * = current connection
 ij(NEWDB)> set connection tours1;
 ij(TOURS1)> disconnect all;
 ij> 
 ij> connect 'jdbc:cloudscape:toursDB' user 'sa' password 'cloud3x9';
 ij>
[top]
[prev]
[next]


Cloudscape Version 3.0
For technical support, go to: www.cloudscape.com and click Support.
Copyright © 1998 and 1999 Cloudscape, Inc. All rights reserved.