@PackDaddy/

Stevo's second repl

Python 2.7

Trying to interface with microsoft access file

fork
loading
Files
  • main.py
  • requirements.txt

This Plugin Crashed!

Error: Error: must not create an existing file {"type":"CREATE_FILE","wid":"0.8106957843163591","path":"main.py","file":{"path":"main.py","content":{"asEncoding":{"base64":"IyBpbXBvcnQgcHlvZGJjCmltcG9ydCBvcwoKcGF0aCA9IHInQzpcVXNlcnNcc3RlcGFjXERvd25sb2FkcycKCmZvciBmaWxlIGluIG9zLmxpc3RkaXIocGF0aCk6CiAgICBpZiBmaWxlLmVuZHN3aXRoKCIubWRiIik6CiAgICAgICAgcHJpbnQob3MucGF0aC5qb2luKHBhdGgsIGZpbGUpKQoKCgojIGNvbm4gPSBweW9kYmMuY29ubmVjdChyJ0RyaXZlcj17TWljcm9zb2Z0IEFjY2VzcyBEcml2ZXIgKCoubWRiLCAqLmFjY2RiKX07REJRPUM6XFVzZXJzXHN0ZXBhY1xEb3dubG9hZHNcRHVubHVjZV9TUC5tZGI7JykKIyBjdXJzb3IgPSBjb25uLmN1cnNvcigpCgojIGN1cnNvci5leGVjdXRlKCdzZWxlY3QgKiBmcm9tIHRhYmxlIEJFRFMnKQogICAKIyBmb3Igcm93IGluIGN1cnNvci5mZXRjaGFsbCgpOgojICAgICBwcmludCAocm93KQo="},"asBuffer":null},"loaded":true}}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
# import pyodbc
import os

path = r'C:\Users\stepac\Downloads'

for file in os.listdir(path):
    if file.endswith(".mdb"):
        print(os.path.join(path, file))



# conn = pyodbc.connect(r'Driver={Microsoft Access Driver (*.mdb, *.accdb)};DBQ=C:\Users\stepac\Downloads\Dunluce_SP.mdb;')
# cursor = conn.cursor()

# cursor.execute('select * from table BEDS')
   
# for row in cursor.fetchall():
#     print (row)