|
Are there
any things to remember when connecting to MSSQL Server inside SQLWindows/32
General
Read the book "Connecting Centura Objects to databases" carefully.
All important things are discussed there, but not easy to find.
Autocommit
When you connect to SQLServer then autocommit is turned on by default.
For normal Centura applications autocommit off should be the better
alternative.
Call SqlSetParameter(hSqlWork, DBP_AUTOCOMMIT, FALSE,
'')
Cursor Context
Preservation
CCP is turned off by default. If you want to use this feature (normally
you will)
Call SqlSetParameter(hSqlWork,
DBP_PRESERVE, TRUE, '')
Isolation
Level
Centura isolation levels are mapped to MS ones. Read "Connecting
Centura Objects to databases" for further information. This is usual:
Call
SqlSetIsolationLevel(hSqlWork, 'RL')
Result Set
Mode (server side)
Result set mode is turned off by default. But server side result
sets are essential to many browsing applications to scroll forward
and backward. To activate this feature: Set the global variable
SqlResultSet=TRUE before connecting the first cursor and for all
succeding connects the resultset mode is turned on. Or
call SqlSetResultSet(hSql,
TRUE) to turn it on manually.
ROWID
The virtual
column rowid does not exist in MS-SQLServer. But this is often used
in Centura Applications for updating smaller tables without primary
key or to resolve concurred data access. For this purpose DBTrans
creates a column named rowid with the datatype "timestamp". This
datatype has nearly the desired behaviour as the original SQLBase
rowid. In most of the cases it's not necessary to change applications!

|