freetds AT lists.ibiblio.org
Subject: FreeTDS Development Group
List archive
- From: "Jay Miller" <jaymiller AT socket.net>
- To: <freetds AT franklin.oit.unc.edu>
- Subject: ODBC - Problem found
- Date: Mon, 7 Aug 2000 13:54:40 -0500
Ahhh....I've found it. The ODBC driver isn't set up to read the ODBC.INI
file. Here is the offending code:
SQLRETURN SQL_API SQLDriverConnect(
SQLHDBC hdbc,
SQLHWND hwnd,
SQLCHAR FAR *szConnStrIn,
SQLSMALLINT cbConnStrIn,
SQLCHAR FAR *szConnStrOut,
SQLSMALLINT cbConnStrOutMax,
SQLSMALLINT FAR *pcbConnStrOut,
SQLUSMALLINT fDriverCompletion)
{
/* kludge */
return SQLConnect(hdbc,"JDBC",NULL,"guest",NULL,"sybase",NULL);
}
SQLRETURN SQL_API SQLConnect(
SQLHDBC hdbc,
SQLCHAR FAR *szDSN,
SQLSMALLINT cbDSN,
SQLCHAR FAR *szUID,
SQLSMALLINT cbUID,
SQLCHAR FAR *szAuthStr,
SQLSMALLINT cbAuthStr)
{
struct _hdbc *dbc;
dbc = (struct _hdbc *) hdbc;
tds_set_server(dbc->tds_login,szDSN);
tds_set_user(dbc->tds_login,szUID);
tds_set_passwd(dbc->tds_login,szAuthStr);
dbc->tds_socket = (void *) tds_connect(dbc->tds_login);
return SQL_SUCCESS;
}
I changed the hard coded connect strings to those for my database, then
added the version and port lines from my previous message, now it is
working.
Jay Miller
Socket Internet Services
Columbia, MO, US
http://www.socket.net
- ODBC - Problem found, Jay Miller, 08/07/2000
Archive powered by MHonArc 2.6.24.