On 04/20/2015 9:49 AM, Niemann, Hartmut wrote:

this is the source

--------------------

    try:

        print "Open ADOB.Connection"

        ado = win32com.client.Dispatch("ADODB.Connection")

connectionstring = "Provider=Microsoft.Jet.OLEDB.4.0; Data Source=\"%s\"" % filename # Access 2003

#connectionstring = "Provider=Microsoft.ACE.OLEDB.12.0;Data Source=\"%s\"" % filename # Access 2007

        print "Open ADOB.Connection with '%s'" % connectionstring

        ado.Open(connectionstring)

except pythoncom.com_error, (hr, msg, exc, arg): # pylint: disable=E1101

        print "The Access call failed with code %d: %s" % (hr, msg)

        if exc is None:

            print "There is no extended error information"

        else:

            wcode, source, text, helpFile, helpId, scode = exc

            print "The source of the error is", source

            print "The error message is", text

print "More info can be found in %s (id=%d)" % (helpFile, helpId)

        raise

    return ado

------------

This is the result

------------------

Open ADOB.Connection with 'Provider=Microsoft.Jet.OLEDB.4.0; Data Source="out\Stoermeld-B97.mdb"'

The Access call failed with code -2147352567: Ausnahmefehler aufgetreten.

The source of the error is ADODB.Connection

The error message is Der Provider kann nicht gefunden werden. Möglicherweise ist er nicht richtig installiert worden.


I don't read or speak German so my thought on what this error says could be wrong but, it looks like it is saying that the Data Provider is missing. If so, you need Jet.OLEDB.4.0 providers install on the machine. They should be install with Access 2000 but am assume you just have the mdb file. Might want to check the MS site to see if you can download the provider without Access 2000.

--
Rod

"Times are bad. Children no longer obey their parents, and everyone is writing a 
book."
  -- Marcus Tullius Cicero(106 BC - 43 BC)



_______________________________________________
python-win32 mailing list
python-win32@python.org
https://mail.python.org/mailman/listinfo/python-win32

Reply via email to