Notes on using the SNC interface

SQL batch statements

The SNC interface supports SQL batch statements. However, they must be enclosed in a BEGIN...END block or start with the keyword DECLARE:

You can run the batch of SQL statements in the Database painter. For example:

String batchSQL //contains a batch of SQL statements
DECLARE my_cursor DYNAMIC CURSOR FOR SQLSA ;
PREPARE SQLSA FROM :batchSQL ;
OPEN DYNAMIC my_cursor ;

//first result set
FETCH my_cursor INTO . . .

//second result set
FETCH my_cursor INTO . . 
. . .
CLOSE my_cursor ;

Connection pooling

The SNC interface pools connections automatically using OLE DB pooling. To disable OLE DB pooling, type the following in the Extended Properties box on the Connection tab page in the Database Profile Setup dialog box:

OLE DB Services=-4

You can also type the following statement in code:

ProviderString='OLE DB Services=-4')

Triggers and synonyms in the Database painter

In the Objects view for SNC profiles in the Database painter, triggers display for tables in the Tables folder and Microsoft SQL Server 2005 synonyms display for tables and views.