pyodbc adapter doesn't support host:port syntax

Issue #634 resolved
Former user created an issue

When migrating from adodbapi to pyodbc, I ran into a connection failure with the connect URL including a port number:

from sqlalchemy import * global_connect( 'mssql://localhost:1234/testdb' ) default_metadata.engine.connect()

The last statement will fail when using pyodbc, but works fine in adodbapi.

The attached patch addresses the issue and is backward compatible, allowing host,port and host:port syntax (host,port is handled the same way it currently is, where the entire string is parsed as the hostname).

Comments (4)

  1. Former user Account Deleted

    I just added a second revision to the patch (supercedes the first patch) that handles the common functionality in the parent class.

  2. Log in to comment