Re: Using DBLIB With Azure

"James K. Lowden" <[email protected]>
Newsgroups gmane.comp.db.tds.freetds
Message-ID <[email protected]>
On Wed, 23 Mar 2011 13:47:09 -0400
Ken Collins <[email protected]> wrote:

> >> That process is exactly the problem. Like I said, Azure does not have a notion of "USE..." and that is what dbuse() does.
> > 
> > Exactly what problem, exactly?  
> 
> The problem, described on this page:
> http://msdn.microsoft.com/en-us/library/ee336235.aspx
> 
> Note
> The USE command is not supported for switching between databases. Establish a connection directly to the target database.

Presto, OK, I get it.  Gads, the hoops they make us jump through.  

> My suggesting before was either extending the public headers to give me something like dbsetldb() 

DBSETLDBNAME() is the most natural way to extend db-lib to include the database name in the login packet.  It will require modifying TDSLOGIN to hold the name, and tds_config_login() to copy it to the TDSCONNECTION.  

> or perhaps even looking deeper into FreeTDS and see why config.c was not picking up and my database name

That may become apparent as you grovel through config.c.  

HTH.  

--jkl
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.