Package: freetds-dev
Version: 0.91-1

hi

on debian squeeze i used freetds-dev in version 0.82-7. the code below did work and did not need a Port entry in the INI file.

After switching to wheezy (freetds-dev version 0.91-1) i had to do some recompilation from source of the library with debugging information and stepped into it with the debugger and found out, that when there is no "Port" Entry in the INI File, dbopen will just return a null pointer without doing any error or message. i think that behaviour is not so good. after adding a Port entry in the INI File, the system works again.

so two problems here:

1) i now need a Port entry in the ini file as opposed to the last version.

2) if i don't have a Port entry, i will get no useful information. just generic failure.

point 1) can be seen as a feature and not bug. but point 2) is bad.


the database i want to connect to is some ms-sql server on tcp port 1433.
here's what i do:

   if (dbinit() != SUCCEED) throw_dbfatalerror(CODEPOS "dbinit failed");
  dberrhandle(err_handler); <-- err_handler won't ever get called!
  dbmsghandle(msg_handler); <-- msg_handler won't ever get called!

  LOGINREC *login = dblogin();

if (DBSETLCHARSET(login, "iso_1") != SUCCEED) throw_dbfatalerror("DBSETLCHARSET failed"); if (DBSETLUSER(login, "myusername") != SUCCEED) throw_dbfatalerror("DBSETLUSER failed"); if (DBSETLPWD(login, "mypassword") != SUCCEED) throw_dbfatalerror("DBSETLPWD failed"); if (DBSETLAPP(login, "myappname") != SUCCEED) throw_dbfatalerror("DBSETLAPP failed");

    DBPROCESS *foo = dbopen(login.get(), "yyydbfreetds");
foo is now a null pointer!

the contents of /etc/freetds.conf are:
[yyydbfreetds]
host = myhostname
port = 1433
tds version = 8.0


if you leave out the "port" line, problematic behaviour will be as described above.



cya
erik


--
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org

Reply via email to