mirror of
https://github.com/php/php-src.git
synced 2024-11-28 12:26:37 +08:00
MFB
This commit is contained in:
parent
32a0044a21
commit
935672787a
@ -2088,7 +2088,7 @@ int odbc_sqlconnect(odbc_connection **conn, char *db, char *uid, char *pwd, int
|
||||
* #ifdef HAVE_EMPRESS */
|
||||
{
|
||||
int direct = 0;
|
||||
char dsnbuf[300];
|
||||
char dsnbuf[1024];
|
||||
short dsnbuflen;
|
||||
char *ldb = 0;
|
||||
int ldb_len = 0;
|
||||
@ -2105,13 +2105,16 @@ int odbc_sqlconnect(odbc_connection **conn, char *db, char *uid, char *pwd, int
|
||||
}
|
||||
}
|
||||
|
||||
if (direct)
|
||||
rc = SQLDriverConnect((*conn)->hdbc, NULL, ldb, strlen(ldb), dsnbuf, 300,
|
||||
if (direct) {
|
||||
rc = SQLDriverConnect((*conn)->hdbc, NULL, ldb, strlen(ldb), dsnbuf, sizeof(dsnbuf),
|
||||
&dsnbuflen, SQL_DRIVER_NOPROMPT);
|
||||
else
|
||||
} else {
|
||||
rc = SQLConnect((*conn)->hdbc, db, SQL_NTS, uid, SQL_NTS, pwd, SQL_NTS);
|
||||
if (ldb)
|
||||
}
|
||||
|
||||
if (ldb) {
|
||||
efree(ldb);
|
||||
}
|
||||
}
|
||||
#else
|
||||
rc = SQLConnect((*conn)->hdbc, db, SQL_NTS, uid, SQL_NTS, pwd, SQL_NTS);
|
||||
|
Loading…
Reference in New Issue
Block a user