Each of the three connection mechanisms seem to use a slightly different
syntax for specifying the port in the connection string. I believe pymssql
and adodbapi are all set at this point. I'll look into pyodbc later today.

Rick


On 4/2/07, El Gringo <[EMAIL PROTECTED]> wrote:
>
>
> Port has to be added to the connection string with pyodbc, the same
> way as adodbapi and pymssql
>
>     def make_connect_string(self, keys):
>         connectors = ["Driver={SQL Server}"]
>         if keys.has_key("port"):
>           keys["host"] = keys["host"] + "," + str(keys["port"])
>           del keys["port"]
>         connectors.append("Server=%s" % keys.get("host"))
>         connectors.append("Database=%s" % keys.get("database"))
>         user = keys.get("user")
>         if user:
>             connectors.append("UID=%s" % user)
>             connectors.append("PWD=%s" % keys.get("password", ""))
>         else:
>             connectors.append ("TrustedConnection=Yes")
>         return [[";".join (connectors)], {}]
>
>
> >
>

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