[DB-SIG] mx.ODBC.Windows.Connect problem
M.-A. Lemburg
mal@lemburg.com
Fri, 25 Oct 2002 20:36:56 +0200
Krjukov Victor wrote:
> Hi.
>
> I have a following problem using Connect:
>
> import mx.ODBC.Windows
> C = mx.ODBC.Windows.Connect("driver={SQL
> Server};server=zsun;uid=;pwd=;database=dbcompany")
Try mx.ODBC.Windows.DriverConnect()
>
> Traceback (most recent call last):
> File "<stdin>", line 1, in ?
> mxODBC.InternalError: ('S1090', 0, '[Microsoft][ODBC Driver Manager]
> Invalid str
> ing or buffer length', 5950)
>
> However, the following VBA code works:
>
> Sub a()
> Dim cnn1 As ADODB.Connection
>
> Set cnn1 = New ADODB.Connection
> cnn1.ConnectionString = "driver={SQL
> Server};server=zsun;uid=;pwd=;database=dbcompany"
> cnn1.Open
> End Sub
>
> Any ideas?
>
> Thanks. Victor.
>
> _______________________________________________
> DB-SIG maillist - DB-SIG@python.org
> http://mail.python.org/mailman/listinfo/db-sig
--
Marc-Andre Lemburg
CEO eGenix.com Software GmbH
_______________________________________________________________________
eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,...
Python Consulting: http://www.egenix.com/
Python Software: http://www.egenix.com/files/python/