[prev in list] [next in list] [prev in thread] [next in thread]
List: mysql-odbc
Subject: fix for reading Intersolv odbc.ini
From: Scott Weikart <scott () igc ! apc ! org>
Date: 1999-10-23 0:34:49
[Download RAW message or body]
My document describing "Using MySQL/MyODBC with ColdFusion" has moved to:
ftp://ftp.igc.apc.org/pub/myodbc/README
I just got mail today with a patch to fix one of the problems mentioned in my
document.
-scott
=============================================================================
Subject: fix for LogonID/Password in odbc.ini (solaris)
To: scott@igc.org
Date: Fri, 22 Oct 1999 16:01:42 +0200 (CEST)
Cc: schilham@win.tue.nl
Hi Scott!
As you noted in your README, the LogonID and Password parameters in odbc.ini
don't seem to work. Fortunately, I managed to get them working on Solaris,
see the included diff file. The function fix_str() in connect.c seems to cause
the problem. By the way, the parameter LogonID is replaced by User:
[mytest]
Driver=/usr/local/myodbc/lib/libmyodbc.so
Description=MySQL
Database=mytest
User=robin
Password=mamamia
Robin Schilham
schilham@win.tue.nl
system: SunOS xxx 5.6 Generic_105181-05 sun4u sparc SUNW,Ultra-5_10
myodbc: myodbc-2.50.24
mysql: Ver 7.11 Distrib 3.22.25, for sun-solaris2.6 on sparc
----------------------------------------------------------------------------------
$ diff connect.c connect.c-new
192a193,197
> SQLGetPrivateProfileString(dsn_ptr,"user",
> "", user, sizeof(user),"ODBC.INI");
> SQLGetPrivateProfileString(dsn_ptr,"password",
> "", passwd, sizeof(passwd),"ODBC.INI");
>
235,237c240
< passwd_ptr=fix_str(passwd,(char FAR*) szAuthStr,cbAuthStr);
< if (!passwd_ptr[0]) /* Use my.cnf if empty password ! */
< passwd_ptr=0;
---
>
239,241c242,243
< if (!mysql_real_connect(&dbc->mysql,host,fix_str(user,(char FAR *) szUID,
< cbUID),
< passwd_ptr,
---
> if (!mysql_real_connect(&dbc->mysql,host,user,
> passwd,
250,252c252,253
< if (!mysql_real_connect(&dbc->mysql,host,fix_str(user,(char FAR *) szUID,
< cbUID),
< passwd_ptr,
---
> if (!mysql_real_connect(&dbc->mysql,host,user,
> passwd,
----------------------------------------------------------------------------------
---------------------------------------------------------------------
Please check "http://www.mysql.com/Manual_chapter/manual_toc.html" before
posting. To request this thread, e-mail myodbc-thread820@lists.mysql.com
To unsubscribe, send a message to the address shown in the
List-Unsubscribe header of this message. If you cannot see it,
e-mail myodbc-unsubscribe@lists.mysql.com instead.
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic