[Devel] unixODBC connection
Bogdan-Andrei Iancu
bogdan at voice-system.ro
Thu Dec 29 12:21:06 CET 2005
Hi Lenir,
thanks for the debugging - I will talk with Marco about adding this changes.
regards and A Happy New Year,
bogdan
Lenir wrote:
>
> 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 at openser.org
>http://openser.org/cgi-bin/mailman/listinfo/devel
>
>
More information about the Devel
mailing list