ADO 2.5 connection problem
Geoff Talvola
gtalvola at nameconnector.com
Wed Jul 19 12:25:17 EDT 2000
Dale Strickland-Clark wrote:
> I've just knocked up a JavaScript equivalent of this as a Windows Scripting
> Component and it works a treat.
>
> Is it me or is Python Win32Com doing something stupid?
Both :-) You need to use rs.Open, not rs.open. Case matters. The error
message is about as misleading as can be, though.
Incidentally, I use the following to create a connection to an Access db:
db = win32com.client.Dispatch("ADODB.Connection")
db.Mode = win32com.client.constants.adModeReadWrite # if we want to be
able to write
db.Provider = 'Microsoft.Jet.OLEDB.3.51'
db.Open(dbfile)
I don't know if there are any advantages or disadvantages compared to what
you're doing, but who knows, it may help you out somewhere down the road to know
this method...
--
- Geoff Talvola
Parlance Corporation
gtalvola at NameConnector.com
More information about the Python-list
mailing list