python and databases

Sibylle Koczian nulla.epistola at web.de
Wed Mar 15 05:53:33 EDT 2017


Am 15.03.2017 um 01:23 schrieb Michael Torrie:
> On 03/14/2017 01:59 PM, Xristos Xristoou wrote:
>> I have a database in  microsoft ACCESS with about 150 records.. if I
>> want to get some data from this database using  a query in python and
>> i want to store in some variables in python that will do this ? to
>> avoid the 150 if ...: Using the standard library the python? know
>> easily put it an SQL query but i canot use additional library
>> python.
>
> If you simply want to move data to an sql server, your best bet is to
> use mdbtools to dump the database schema and records out to an .sql file
> that you can then massage and import into whatever sql server you are
> using.
>
> https://github.com/brianb/mdbtools
>
> If you're looking for a way to use the access file directly, and
> continue using it in MS Access, you might be able to get the odbc bridge
> working (on windows of course), and communicate with it with pyodbc.
>

Or you could use adodbapi. Depending on your Python installation you 
might have the Python for Windows extensions already installed (are they 
still part of ActivePython?), so that might not count as a third party 
library.





More information about the Python-list mailing list