For those of you using ADO

From: Robert Brewer (fumanchu_at_amor.org)
Date: 11/25/03


Date: Mon, 24 Nov 2003 16:57:47 -0800
To: <python-list@python.org>

This has to be the oddest thing I've yet come across. My current Big
Project uses a win32com wrapper to ADO. For weeks now, I've wrestled
with connection strings: adding parameters, then removing them, then
changing the order, then trying silly things like extra semicolons, etc.
I finally nailed down a thesis for Why It Was So Hard--the ADO 2.7 dll
ignores the first parameter in the connection string. I have to admit
I'm guessing it's ADO's fault, that win32com.client just passes the
string along. Correct me if I'm wrong, but the fix is simple enough I
don't feel I need to track it down further.

The fix is the same as the proof:

"DSN=RE7_1;UID=mcuser;PWD=*******;"

doesn't work, giving an error like "Neither DSN nor SERVER found in
connection string," (this is for MS SQL Server; different messages with
the same intent result on e.g. MS Access), while:

"DSN=RE7_1;UID=mcuser;PWD=*******;DSN=RE7_1;"

does work. Further combinations with and without duplicating the first
param produce similar results. Go figure.

Not really a Python problem, I don't think, but I figured someone might
be aided by the theory/fix.

Adding another page to the Googlable universe,

Robert Brewer
MIS
Amor Ministries
fumanchu@amor.org



Relevant Pages

  • Re: DSN Behaving Badly
    ... With ADO, you can have either a global connection string, global command ... your application which use data from the sql server. ... With ADO, you would still have tbl1, but it would be a local table (for ...
    (comp.databases.ms-access)
  • Re: Read info from a file
    ... :>> string I wanted to read from the file was the Initial Catalog and the ... :>>> Are you using ADO to connect to the db? ... :>>>> I have a project that is going to connect to a SQL Server. ... :>>>> connection string so that it looks at the correct SQL Server and ...
    (microsoft.public.vb.syntax)
  • Re: EOleException: "Multiple-step Operation generated Errors...
    ... If so I have seen that probelm with Advantage and ADO, there is a fix for ... > I am receiving thsi error when insering a record into a SQL Server 2000 ...
    (borland.public.delphi.database.ado)
  • Connection String to Connect a VB 6 Application to SQL Server 2005
    ... SQL Server 2000 Database. ... I use ADO, I have the lates MDAC installed. ... What's the equivalent Connection string to ... connect my application to a SQL Server 2005 Database. ...
    (microsoft.public.data.ado)
  • Re: SQL Server Not listed in Browse list on Query Analyzer
    ... I think you can connect sql server by IP, if you can connect the server. ... The second, if you have problem of connection string in ADO, you can ... connect the sql server in IDE and drag a table to your application, ...
    (microsoft.public.sqlserver.setup)