ADO/ODBC call via Python/IIS

Bill Seitz fluxent at yahoo.com
Thu Feb 8 00:06:17 CET 2001


D'oh, had a typo. Now I get a different error.
adoConn.Open('driver=SQL
Server;server=sql0;uid=xxx;pwd=yyy;database=zzz')

....COM Error: [Microsoft][ODBC SQL Server Driver][SQL Server]Login
failed for user 'xxx'. Reason: Not associated with a trusted SQL Server
connection.

OK, this is more familiar. I'm guessing either (a) it's not recognizing
the server name, or (b) it's trying to do a "SQL Server
authentication", when our SQL Server is set up to only do Active
Directory authentication. I suspect it's (b).


In article <95sjll$bbs$1 at nnrp1.deja.com>,
  Bill Seitz <bseitz at my-deja.com> wrote:
> Did some more research. Changed a line of code to look like
> adoConn = win32com.client.Dispatch('ADODB.Connection')
> adoConn.Open('SQL Server;server=sql0;uid=xxx;pwd=yyy;database=zzz')
>
> Get similar error message:
> Error Type:
> Python ActiveX Scripting Engine (0x80020009)
> Traceback (innermost last): File "<Script Block >", line 3, in ? x =
> aAdoDsn.aConnect() File "c:\python20\ipath\aAdoDsn.py", line 8, in
> __init__ adoConn.Open('SQL
> Server;server=sql0;uid=xxx;pwd=yyy;database=zzz') File "c:\python20
> \win32com\gen_py\00000206-0000-0010-8000-00AA006D2EA4x0x2x6.py", line
> 1833, in Open return self._ApplyTypes_(0xa, 1, (24, 32), ((8, 49), (8,
> 49), (8, 49), (3, 49)), 'Open', None,ConnectionString, UserID,
> Password, Options) File "c:\python20\win32com\client\__init__.py",
line
> 334, in _ApplyTypes_ return self._get_good_object_(apply
> (self._oleobj_.InvokeTypes, (dispid, 0, wFlags, retType, argTypes) +
> args), user, resultCLSID) COM Error: [Microsoft][ODBC Driver Manager]
> Data source name not found and no default driver specified
>
> What am I doing wrong?
>
> In article <95sisd$ahc$1 at nnrp1.deja.com>,
>   Bill Seitz <fluxent at yahoo.com> wrote:
> > Well, it's a User DSN. Do you know that ASP expects a system DSN?
> >
> > And, I'm not clear on what a DSN-less connection is. Does this mean
> > that I don't set up an ODBC source at all, but just pass all the
> > connection details along in a code call? If so, do I need to use a
> > different COM object (see my original posting for code), or just
call
> > the same object with a bigger set of params? (Sorry, I'm new at
this,
> > probably need some additional books of examples...)
> >
> > In article <%FGe6.31314$Ch.7369562 at newsrump.sjc.telocity.net>,
> >   "dsavitsk" <dsavitsk at e-coli.net> wrote:
> > > > >         adoConn.Open('pyasp')
> > >
> > > > Is it possobile pyasp is a user DSN, when ASP expects systems
> DSNs?
> > >
> > > if this is the issue, asp and python work well (faster in fact on
a
> > web
> > > server) with dsn-less connection strings.
> > >
> > > ds
> > >
> > >
>
> Sent via Deja.com
> http://www.deja.com/
>


Sent via Deja.com
http://www.deja.com/



More information about the Python-list mailing list