Menu

#3 How to connect to OLEDB in Python 3.5

v1.0_(example)
open
None
9
2016-02-12
2016-02-12
Egor
No

Hello. I can't find any information. I am a newbie in Python programming.
My question is: how to connect to OLEDB using connectionstring?

I try this on python 3.5

import adodbapi
import config

con_str = '“STRING”'.format(config.PATH_ACCDB)

....................

conn = adodbapi.connect(con_str)
cur = conn.cursor()
cur.execute("""select
{
....

  And get the error:
  Traceback (most recent call last):

File "C:/.../PycharmProjects/repa/oledb.py", line 2, in <module>
import config
File "C:...\python\lib\site-packages\config.py", line 733
except Exception, e:
^
SyntaxError: invalid syntax

Is there is a way to connect to OLEDB through connectionstring?
Thank you!

Discussion


Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.