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.

password<br />

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

Password for authentication of the connection. <strong>SQL</strong> verifies the password against a<br />

corresponding user name before it connects to the database.<br />

The value of the DH_PASSWD environment variable determines the default password.<br />

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

character string host variables.<br />

• An application can connect to more than one database at a time, with a maximum of 10<br />

connections. However, the application can actually gain access to only one database at a<br />

time. The database name specified in the CONNECT statement becomes the active one.<br />

• If an application executes a <strong>SQL</strong> statement before connecting to a database, an attempt is<br />

made to connect to the environment-defined database, if any. If the connection is<br />

successful, the <strong>SQL</strong> statement is executed on that database.<br />

Examples The following example illustrates the CONNECT statement:<br />

Syntax<br />

CONNECT TO "salesdb" AS "sales_conn";<br />

CONNECT TO "progress:T:localhost:custdb" AS "cust_conn";<br />

CONNECT TO DEFAULT;<br />

• The first statement shown connects to the salesdb database on the local system.<br />

• The second statement connects to the custdb database on the local system.<br />

• The last statement connects to the environment-defined database by default.<br />

Authorization<br />

None<br />

Related statements<br />

DISCONNECT, SET CONNECTION<br />

DECLARE CURSOR<br />

Associates a cursor with a static query or a prepared dynamic query statement. The query or the<br />

prepared statement can have references to host variables.<br />

DECLARE cursor_name CURSOR FOR<br />

{ query_expression [ ORDER BY clause ] [ FOR UPDATE clause ]<br />

| prepared_statement_name<br />

} ;<br />

cursor_name<br />

A name you assign to the cursor. The name must meet the requirements for an identifier.<br />

323

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

Saved successfully!

Ooh no, something went wrong!