23.10.2012 Views

Openedge Data Management: SQL Reference - Product ...

Openedge Data Management: SQL Reference - Product ...

Openedge Data Management: SQL Reference - Product ...

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

E<strong>SQL</strong> elements and statements<br />

Syntax<br />

322<br />

CONNECT TO connect_string<br />

[ AS connection_name ]<br />

[ USER username ]<br />

[ USING password ] ;<br />

connect_string<br />

Syntax<br />

Note Arguments to CONNECT must be either string literals enclosed in quotation marks or<br />

character-string host variables.<br />

connect_string<br />

Specifies to which database to connect. If the CONNECT statement specifies DEFAULT, <strong>SQL</strong><br />

tries to connect to the environment-defined database, if any. The value of the DB_NAME<br />

environment variable specifies the default connect string.<br />

The connect_string can be a simple database name or a complete connect_string. A<br />

complete connect string has the components shown in the following table:<br />

connection_name<br />

username<br />

{ DEFAULT | db_name | db_type:T:host_name:port_num:db_name }<br />

Connect string Description<br />

db_type Type of database. The only currently supported database type<br />

is progress<br />

T T directs the <strong>SQL</strong> engine to use the TCP/IP protocol<br />

host_name Name of the system where the database resides<br />

port_num Port number to use for the connection<br />

db_name Name of the database<br />

The name of the connection as either a character literal or host variable. If the CONNECT<br />

statement omits a connection name, the default is the name of the database. Connection<br />

names must be unique.<br />

User name for authentication of the connection. <strong>SQL</strong> verifies the user name against a<br />

corresponding password before it connects to the database. The value of the DH_USER<br />

environment variable specifies the default user name. If DH_USER is not set, the value of<br />

the USER environment variable specifies the default user name.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!