Здравствуйте, Rick, Вы писали:
R>Здравствуйте, Sergey Merkuriev, Вы писали:
R>В при установке DB2 есть возможность поставить примеры и там всё это есть.
R>У меня например здесь C:\Program Files\SQLLIB\samples\cli\dbconn.c
Нашел нашел... чудо, чудо. И этого обнаружил на занюханом сайте
http://aurora.regenstrief.org, в то время, как на IBM-е этого нет. А надо то было вот это:
sample@minerva.edu.au
kim.sample@127.0.0.1
SQLConnect
RETCODE SQL_API SQLConnect( LPDBC lpdbc,
UCHAR FAR *szDSN,
SWORD cbDSN,
UCHAR FAR *szUID,
SWORD cbUID,
UCHAR FAR *szAuthStr,
SWORD cbAuthStr
);
ODBC core level
X/Open yes
calling parameters
#
# lpdbc - handle to already allocated database context
# szDSN - pointer to string containing database source (table)
# cbDSN - size of string szDSN or SQL_NTS if string is \0 (NUL) terminated
# szUID - pointer to string containing user identifier (user name) for database access
# cbUID - size of string szUID or SQL_NTS if string is \0 (NUL) terminated
# szAuthStr - pointer to string containing password for database access
# cbAuthStr - size of string szAuthStr or SQL_NTS if string is \0 (NUL) terminated
Note:
This special implementation for mSQL may have a different use of szDSN as known by other CLIs or ODBC. You may specify user name, database name and host (system name or IP) within this entry. Examples:
szDSN = <database name> "sample"
<user name>.<database name> "kim.sample"
<database name>@<host> "sample@minerva.edu.au"
<user name>.<database name>@<host> "kim.sample@127.0.0.1"
Note:
If a host isn't specified, a connection to the server on the local machine (localhost) is tried to be established.
....