On Wed, Dec 10, 2008 at 4:21 PM, Rick Morrison <[EMAIL PROTECTED]> wrote:
> Something like this:
>
> As of 0.5 for pyodbc connections:
>
> a) If the keyword argument 'odbc_connect' is given, it is assumed to be a
> full ODBC connection string, which is used for the connection (perhaps we
> can include a facility for Python sting interpolation into this string from
> the dburi components).

What I currently using odbc_connect is to pass in a string
odbc_connect="TDS_Version=7.0" which is appended to the end of the
connection string for pyodbc. It is not assumed to be a full ODBC
connection string. It is just an extra option added to the end. If
there are other parameters it could potentially be appended to
odbc_connect but this one is the only one I need for accessing mssql
from linux. I've never seen a case for other option.

>
> b) otherwise, the host portion of the dburl represents a ODBC DSN. A simple
> connection string is constructed using the user name and password and DSN
> (host) from the dburl. Any given database name is ignored.

I would have to be able to pass the odbc_connect option string to the
end of that as well.



>
> Finally, if present, the contents of the keyword argument 'odbc_options'
> (assumed to be a string) are concatenated to the connection string generated
> in either (a) or (b).

I guess the odbc_options would be a better choice for what what we are
using odbc_connect now. I guess we should have picked that name back
in 0.4.6 when we added it.

Driver is also required when using linux and mssql. On windows the
driver name defaults to sql server but on linux it defaults to
freeTDS, not sure about a mac.

How would driver be passed in a dsn connection.

Thanks,
Lucas


>
>
> >
>



-- 
How to create python package?
http://lucasmanual.com/mywiki/PythonPaste
Bazaar and Launchpad
http://lucasmanual.com/mywiki/Bazaar

--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to