Hi Lenir,

I just committed on CVS some changes on unixodbc module - now the connection string includes the UID and PWD attributes.
Please give it a try and let me know if works for you.

thanks for report and regards,
bogdan

Lenir wrote:

Guys,

Im trying to use the unixodbc module using the FreeTDS drivers. I’m trying to connect to Sybase.

I can connect fine using both isql and tsql and connecting by both: using DSN or specifying host, port UID and PWD, so I know for a fact that unixODBC and FreeTDS are installed and working properly.


The driver reported the following diagnostics whilst running SQLDriverConnect

IM007:1:0:[unixODBC][FreeTDS][SQL Server]Could not find UID parameter

HYC00:2:0:[unixODBC][FreeTDS][SQL Server]Driver not capable

0(0) ERROR:domain_db_init: cannot initialize database connection

0(0) init_mod(): Error while initializing module domain

ERROR: error while initializing modules.

For whatever reason the module is not picking up the UID and PWD from the db_url parameters.

The way I fixed the problem was by changing the file my_con.c, line 68:

From:

sprintf( stringDNS, "%s%s%s", "DSN=", id->database, ";");

to:

sprintf( stringDNS, "%s%s%s", "DSN=", id->database, ";UID=username;PWD=password;");

And now works fine. Also, to add debug to figure out which SQL queries fail, I changed the file dbase.c line 77:

From:

LOG(L_ERR, "Return value: %d\n", ret);

To:

LOG(L_ERR, "Return value: %d, Performing query: %s\n", ret, _s);

Now everytime a query fails it’ll say the result msg, as well as the actual query that failed.

Lenir

------------------------------------------------------------------------

_______________________________________________
Devel mailing list
Devel@openser.org
http://openser.org/cgi-bin/mailman/listinfo/devel


_______________________________________________
Devel mailing list
Devel@openser.org
http://openser.org/cgi-bin/mailman/listinfo/devel

Reply via email to