tds-fdw / tds_fdw

A PostgreSQL foreign data wrapper to connect to TDS databases (Sybase and Microsoft SQL Server)
Other
377 stars 101 forks source link

dbuse with Azure #187

Closed johnpaladin closed 5 years ago

johnpaladin commented 5 years ago

I use dbuse() functions to set the table name on the Azure SQL database, it is connect successfully when I use tsql command. But when use C code to connect it always return fail...

My C code like below: if ( dbuse(dbproc, SQLDBNAME) == FAIL) { exit(1); }

Freetds version 👍 1.00.48.

Very thanks for your reply!

johnpaladin commented 5 years ago

I found the solution!

Just add DBSETLDBNAME(login,"yourdbname") before dbopen() function.

🍡

GeoffMontee commented 5 years ago

Yeah, this is the same issue i had in issue #23.

This question is not really related to tds_fdw though. For FreeTDS issues, I would suggest posting to the FreeTDS mailing list.