 |
SQLConnect ..msdn Add comment W32 Constants Translate this page |
 |
 |
|
SQLConnect establishes connections to a driver and a data source. |
 |
 |
| Code examples: |
 |
|
|
 |
 |
| Declaration: |
 |
 |
SQLRETURN SQLConnect(
SQLHDBC ConnectionHandle,
SQLCHAR * ServerName,
SQLSMALLINT NameLength1,
SQLCHAR * UserName,
SQLSMALLINT NameLength2,
SQLCHAR * Authentication,
SQLSMALLINT NameLength3);
|
 |
 |
 |
| FoxPro declaration: |
 |
 |
DECLARE SHORT SQLConnect IN odbc32 AS SQLConnect32;
INTEGER ConnectionHandle,;
STRING ServerName,;
INTEGER NameLength1,;
STRING UserName,;
INTEGER NameLength2,;
STRING Authentication,;
INTEGER NameLength3
|
 |
 |
 |
| Parameters: |
 |
ConnectionHandle
[Input]
Connection handle.
ServerName
[Input]
Data source name.
NameLength1
[Input]
Length of *ServerName.
UserName
[Input]
User identifier.
NameLength2
[Input]
Length of *UserName.
Authentication
[Input]
Authentication string (typically the password).
NameLength3
[Input]
Length of *Authentication. |
 |
 |
| Return value: |
 |
| SQL_SUCCESS, SQL_SUCCESS_WITH_INFO, SQL_ERROR, or SQL_INVALID_HANDLE. |
 |
 |
| My comment: |
 |
SQLAllocHandle with a HandleType of SQL_HANDLE_DBC is called to allocate a connection.
When the application calls SQLDisconnect to disconnect, the connection is returned to the connection pool and is available for reuse.
I guess I should not explain why this function is declared with an alias. |
 |
 |
| Word Index links for the SQLConnect : |
 |
|
|
 |
 |
| Translate this page: |
 |
|
 |
 |
| • |
 |
| Created: | 2002-03-13 19:13:14 | | Modified: | 2002-03-13 19:20:32 | Visited in last 7 days: 57 |