 |
JetBeginSession ..msdn Add comment W32 Constants Translate this page |
 |
 |
|
Starts new ESE session and initializes and returns an ESE session handle |
 |
 |
| Code examples: |
 |
|
|
 |
 |
| Declaration: |
 |
 |
JET_ERR JET_API JetBeginSession(
__in JET_INSTANCE instance,
__out JET_SESID* psesid,
__in_opt JET_PCSTR szUserName,
__in_opt JET_PCSTR szPassword
);
|
 |
 |
 |
| FoxPro declaration: |
 |
 |
DECLARE INTEGER JetBeginSession IN esent;
INTEGER instance,;
INTEGER @psesid,;
INTEGER szUserName,;
INTEGER szPassword
|
 |
 |
 |
| Parameters: |
 |
instance
The database instance to use for this call.
psesid
Pointer to the variable that the session handle initializes on successful return.
szUserName
This parameter is reserved.
szPassword
This parameter is reserved.
|
 |
 |
| Return value: |
 |
| This function allows for the return of any JET_ERRs that are defined in this API. |
 |
 |
| Usage: |
 |
LOCAL nInstance, cInstanceName, nSession
cInstanceName="JetBlue"
STORE 0 TO nInstance, nSession
= JetCreateInstance(@nInstance, m.cInstanceName)
= JetInit(@nInstance)
= JetBeginSession(nInstance, @nSession, 0, 0)
* ...after doing some useful stuff...
= JetEndSession(nSession, 0)
= JetTerm(nInstance)
|
 |
 |
| My comment: |
 |
Sessions control all access to the database and are used to control the scope of transactions. The session can be used to begin, commit, or abort transactions.
The session is also used to attach, create, or open a database. To increase concurrency and parallel access to the database, multiple sessions can be begun.
See also: JetEndSession |
 |
 |
| Translate this page: |
 |
|
 |
 |
| • |
 |
| Created: | 2008-01-08 17:51:31 | | Modified: | 2008-01-08 17:56:09 | Visited in last 7 days: 16 |