From: Dan Kalowsky Date: Thu, 29 May 2003 12:34:38 +0000 (+0000) Subject: ODBC standards compliance is a good thing. X-Git-Tag: BEFORE_FD_REAPPLY~37 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=7de28bdc6a3b7cbcee3abda9d88b30006bbcc777;p=php ODBC standards compliance is a good thing. # Should be MFB'd, but my PHP5 is drastically different right now.. --- diff --git a/ext/odbc/php_odbc.c b/ext/odbc/php_odbc.c index 7431014fff..355216b00e 100644 --- a/ext/odbc/php_odbc.c +++ b/ext/odbc/php_odbc.c @@ -2113,7 +2113,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; @@ -2131,7 +2131,7 @@ 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, + rc = SQLDriverConnect((*conn)->hdbc, NULL, ldb, strlen(ldb), dsnbuf, sizeof(dsnbuf), &dsnbuflen, SQL_DRIVER_NOPROMPT); else rc = SQLConnect((*conn)->hdbc, db, SQL_NTS, uid, SQL_NTS, pwd, SQL_NTS);