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

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Syntax<br />

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

A DESCRIBE SELECT LIST statement writes the number of select list items to the sqld_nvars<br />

field of an output <strong>SQL</strong>DA. If the sqld_size field of the <strong>SQL</strong>DA is not equal to or greater than<br />

this number, DESCRIBE writes the value as a negative number to sqld_nvars. Design your<br />

application to check sqld_nvars for a negative number to determine if a particular output<br />

<strong>SQL</strong>DA is large enough to process the current SELECT statement.<br />

Authorization<br />

None<br />

Related statements<br />

PREPARE, DECLARE CURSOR, OPEN, FETCH, CLOSE<br />

DISCONNECT<br />

Terminates the connection between an application and the database to which it is connected.<br />

DISCONNECT { 'connection_name' | CURRENT | ALL | DEFAULT } ;<br />

connection_name<br />

CURRENT<br />

ALL<br />

DEFAULT<br />

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

Disconnects the current connection.<br />

Disconnects all established connections.<br />

Disconnects the connection to the default database.<br />

Examples This example illustrates CONNECT TO AS connection_name and DISCONNECT connection_name:<br />

EXEC <strong>SQL</strong><br />

CONNECT TO 'progress:T:localhost:6745:salesdb' AS 'conn_1' ;<br />

/*<br />

** C Language and embedded <strong>SQL</strong> application processing against the<br />

** database in the connect_string<br />

*/<br />

.<br />

.<br />

.<br />

EXEC <strong>SQL</strong><br />

DISCONNECT 'conn_1' ;<br />

The following example illustrates CONNECT TO DEFAULT and DISCONNECT DEFAULT:<br />

327

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

Saved successfully!

Ooh no, something went wrong!