[sqlalchemy] Re: ODBC connection URI

2008-07-22 Thread M.-A. Lemburg

On 2008-05-27 17:28, Michael Bayer wrote:
 
 On May 27, 2008, at 11:19 AM, Rick Morrison wrote:
 
 To be honest I thought this was how we were doing it, but
 (incredulously) looking at the source I see theres a dsn keyword
 argument in there ?!?
  ...
 What's the argument for DSN as the official keeper of the host  
 part as opposed to an actual host  ?  Would it be because in ODBC,  
 DSN is *supposed* to be the primary identifier for how to get to a  
 host ?  That's a fairly strong argument for me.

Yes.

DSNs refer to logical database connections in the ODBC manager
configuration. They don't necessarily map to hosts on the network -
indeed, it's well possible that the database runs on the same machine
and you connect to it via shared memory or pipes. OTOH, it's also
possible to have to connection setups for the same host, e.g. one
setup as read-only connection and the other as read-write connection.

 With the ADO module, there isnt a TCP host option, is my  
 recollection.  The source seems to be sending host along to be  
 interpreted as Data Source, so this appears to be consistent with  
 the host=DSN idea (and I believe this is the MS module I actually  
 played with on the occasion that I actually tried out the MS-SQL  
 dialect).
 
 We are at the 0.5 stage and I haven't yet put out an alpha, so we'd  
 make this switch right there, if we decide upon it.  I don't see any  
 way to make this a graceful switch, except that we provide the  
 server keyword attribute in 0.4 so that people can migrate their  
 URLs to a forwards-compatible keyword-based format.

-- 
Marc-Andre Lemburg
eGenix.com

Professional Python Services directly from the Source  (#1, Jul 23 2008)
  Python/Zope Consulting and Support ...http://www.egenix.com/
  mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/
  mxODBC, mxDateTime, mxTextTools ...http://python.egenix.com/


 Try mxODBC.Zope.DA for Windows,Linux,Solaris,MacOSX for free ! 


eGenix.com Software, Skills and Services GmbH  Pastor-Loeh-Str.48
 D-40764 Langenfeld, Germany. CEO Dipl.-Math. Marc-Andre Lemburg
Registered at Amtsgericht Duesseldorf: HRB 46611

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
sqlalchemy group.
To post to this group, send email to sqlalchemy@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/sqlalchemy?hl=en
-~--~~~~--~~--~--~---



[sqlalchemy] Re: mssql, Linux, unixODBC - Could not loca te column in row for column

2008-04-23 Thread M.-A. Lemburg

On 2008-04-18 18:01, Rick Morrison wrote:
 Reading this thread, I keep wondering why you are trying to put
 all that connection setup configuration into the connection string...

 Such setting are normally configured in the odbc.ini file and then
 you just reference data source name in the connection string.

 That's the standard way of using ODBC and the reason why you
 have ODBC managers with nice setup GUIs. A DSN-less setup
 like the one created by SA bypasses the ODBC manager
 configuration.

 
 Only via an option: DSN connections have been supported for some time via
 the 'dsn' keyword, the OP seems to either not want that or can't get it to
 work.

I know, but this should be the default rather than an option.

 SA should really adapt to the ODBC standard of using data source
 names, as it moves the connection configuration where it should be:
 Into the scope of the ODBC manager you are using to configure your
 ODBC drivers.
 
 
 SA already has a de-facto standard using a db-uri scheme that works with
 non-ODBC datasources as well. It makes sense for ODBC compliant SA database
 drivers to conform to that form, not to just displace it and force a
 config-file style of setup.

The DSN style setup fits in nicely with the URI scheme... just use
the host part of the URI as data source name - after all, the
ODBC manager will connect to the data source and not the
database itself.

Setting up an ODBC driver via the existing GUI tools is a lot
easier and less error prone than trying to figure out all
the different options and trying to put them into your
connection string. The direct approach should really only
be the last resort for very special cases.

-- 
Marc-Andre Lemburg
eGenix.com

Professional Python Services directly from the Source  (#1, Apr 23 2008)
  Python/Zope Consulting and Support ...http://www.egenix.com/
  mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/
  mxODBC, mxDateTime, mxTextTools ...http://python.egenix.com/


 Try mxODBC.Zope.DA for Windows,Linux,Solaris,MacOSX for free ! 


eGenix.com Software, Skills and Services GmbH  Pastor-Loeh-Str.48
 D-40764 Langenfeld, Germany. CEO Dipl.-Math. Marc-Andre Lemburg
Registered at Amtsgericht Duesseldorf: HRB 46611

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
sqlalchemy group.
To post to this group, send email to sqlalchemy@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/sqlalchemy?hl=en
-~--~~~~--~~--~--~---



[sqlalchemy] Re: mssql, Linux, unixODBC - Could not loca te column in row for column

2008-04-18 Thread M.-A. Lemburg

On 2008-04-17 22:24, Lukasz Szybalski wrote:
 On Thu, Apr 17, 2008 at 3:04 PM, Rick Morrison [EMAIL PROTECTED] wrote:
 It's a two-line change that pops the new keyword out of the config dict just
 like the others that were added.

 Mike, can you take a quick look at mssql.py line 804 and see why this might
 be complaining? I've got to run out.

 
 well I don't know if that is a right place to add  that?
 
 from the code this what it would expect
 e = sqlalchemy.create_engine(mssql://xxx:[EMAIL 
 PROTECTED]:1433/xxx?odbc_options=Driver=TDS;TDS_Version=8.0)
 vs you said you wanted:
 sqlalchemy.create_engine('mssql://xxx:[EMAIL 
 PROTECTED]:1433/',odbc_options='DRIVER={TDS};TDS_Version=8.0')
 
 to create
 Server=xx;Database=xx;Port=1433;UID=xx;PWD=xxx;Driver={TDS};TDS_Version=8.0

Reading this thread, I keep wondering why you are trying to put
all that connection setup configuration into the connection string...

Such setting are normally configured in the odbc.ini file and then
you just reference data source name in the connection string.

That's the standard way of using ODBC and the reason why you
have ODBC managers with nice setup GUIs. A DSN-less setup
like the one created by SA bypasses the ODBC manager
configuration.

SA should really adapt to the ODBC standard of using data source
names, as it moves the connection configuration where it should be:
Into the scope of the ODBC manager you are using to configure your
ODBC drivers.

-- 
Marc-Andre Lemburg
eGenix.com

Professional Python Services directly from the Source  (#1, Apr 18 2008)
  Python/Zope Consulting and Support ...http://www.egenix.com/
  mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/
  mxODBC, mxDateTime, mxTextTools ...http://python.egenix.com/


 Try mxODBC.Zope.DA for Windows,Linux,Solaris,MacOSX for free ! 


eGenix.com Software, Skills and Services GmbH  Pastor-Loeh-Str.48
 D-40764 Langenfeld, Germany. CEO Dipl.-Math. Marc-Andre Lemburg
Registered at Amtsgericht Duesseldorf: HRB 46611

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
sqlalchemy group.
To post to this group, send email to sqlalchemy@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/sqlalchemy?hl=en
-~--~~~~--~~--~--~---