Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Python/MS Access Interface

Status
Not open for further replies.

Joyrider564

Programmer
Jul 25, 2005
1
0
0
US
Hi, I am looking on using Python to interface with MS Access databases. If someone could help me out with comparing databases with it, or just pointing me in the right direction, that would be great! Thank you!
 
I haven't tried it, but I would start here:

[red]"... isn't sanity really just a one trick pony anyway?! I mean, all you get is one trick, rational thinking, but when you are good and crazy, oooh, oooh, oooh, the sky is the limit!" - The Tick[/red]
 
any of DAO/ADO/ODBC/just ActiveX

Ion Filipski
1c.bmp
 
I use ADO to process *.dbf (dBase/FoxPro) or AS/400 (DB/2) databases with Python.
The procedure is the same, you only need to specify another connection string for every database.

for *.dbf databases the connection string is e.g.
Code:
DSN='Provider=Microsoft.Jet.OLEDB.4.0;Data Source=d:\Perl_Python\Database;\
	      Extended Properties=FoxPro 3.0;'

for DB/2 on AS/400 e.g.
Code:
DSN='PROVIDER=IBMDA400;DATA SOURCE='+csebk+'; USER ID='+userid+'; PASSWORD='+pwd

and for MS Access it would be probably (i never tried it) something like this
Code:
DSN = 'PROVIDER=Microsoft.Jet.OLEDB.4.0;DATA SOURCE=C:/MyDB.mdb;'

Excellent soure, where you shoud start if you want use ADO in Python is this page
 
This is where I always start for connection strings:

[red]"... isn't sanity really just a one trick pony anyway?! I mean, all you get is one trick, rational thinking, but when you are good and crazy, oooh, oooh, oooh, the sky is the limit!" - The Tick[/red]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top