Skip to Content.
Sympa Menu

freetds - [freetds] web_guy1, please take a look at this, see if it helps you.

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: "Ou Liu" <ou AT qbt.com>
  • To: <freetds AT lists.ibiblio.org>
  • Subject: [freetds] web_guy1, please take a look at this, see if it helps you.
  • Date: Wed, 18 Dec 2002 16:44:09 -0500

Hi,everyone
I want to say sorry about the mess I bring, I really mean the odbc.c's
version not the FreeTDS's version. Really sorry!
web_guy1:
1) First I suggest you to delete all the old files first, don't just
download the new tar ball and untar it, and then configure and make. If you
insist to do so, please see if the make procedure really do sth or not. It
should take some time, if it goes too quick, you know the make procedure is
cheating you.
2) Now download the newest version of FreeTDS and iODBC, do following:
(i) for iODBC
$configure --disable-gui --disable-gtktest
--prefix=/usr/local/iodbc (you
may select your own directory)
if that is not enough, maybe you want to add CC=...., RANLIB=....
$make
$su
#make install
(ii) for freetds







$configure --with-iodbc=/usr/local/iodbc --prefix=/usr/local/freetds --with-
tdsver=7.0 (here the version depend on which version of SQL Server you are
using, take a look at the User Guide)
Also here the directory specified by the --with-iodbc should
be the same
as the you mentioned before
$make
$su
#make install
3) export ODBCINI and ODBCINSTINI
4) make your .odbc.ini and freetds.conf right. (you can take a look
at the
user guide)
5) Now when you edit the .odbc.ini, set the Trace to 'on' (Or just
add a
line "Trace = on" in your file)
6) use the odbctest located in the iODBCHOME/bin/ to make a test,
don't use
./odbctest DSN=XXX;...
use ./odbctest "DSN=XXX;..." instead. Or just type a ./odbctest
and the
program will ask you for some connection string, then input the whole thing
7) if odbctest still crash, now you know which function make odbctest
crash
IF YOU STILL MEET CRASH
8) Now check the "connect.c" of the iodbc, do
$vi connect.c
in vi search for en_AllocHandle after the position you found
the
en_AllocHandle you should find codes like:
----------------------------------------------------------------------------
---------------------
penv->dodbc_ver = SQL_OV_ODBC3;
CALL_DRIVER (hdbc, genv, retcode, hproc, en_AllocHandle,
(SQL_HANDLE_ENV, SQL_NULL_HANDLE, &(penv->dhenv)));
if (retcode == SQL_SUCCESS || retcode == SQL_SUCCESS_WITH_INFO)
{ /* this is an ODBC3 driver - introduce the
app's requested version */
hproc = _iodbcdm_getproc (pdbc, en_SetEnvAttr);
if (hproc != SQL_NULL_HPROC)
{
CALL_DRIVER (hdbc, genv, retcode, hproc, en_SetStmtAttr,
(penv->dhenv, SQL_ATTR_ODBC_VERSION,
genv->odbc_ver, 0));
}
}
----------------------------------------------------------------------------
---------------------

Take a look if the code is just like that, if not maybe you have used
the
patch from Patrick. don't change anything, othewise just change the
SQL_OV_ODBC3 into SQL_OV_ODBC2 for now.
9) Now check the "odbc.c" of the freetds, in this file search for not
implemented functions, commented them out, it's easy. just do seach
"implement", you will find all of them.
In the latest version of odbc.c, Freddy seems to forget comment the
SQLSetEnvAttr out, but it's ok. you can do it or not do it.
10) Now compile the whole thing again, first compile the iodbc then
freetds, don't try another way!

Good Luck
Ou




  • [freetds] web_guy1, please take a look at this, see if it helps you., Ou Liu, 12/18/2002

Archive powered by MHonArc 2.6.24.

Top of Page