Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

Does anyone know of a method to convert an ESRI File Geodatabase Table into Access 2007 Table programmatically. I have been trying using the PYODBC library and a series of insert statements but am having difficultly with some of the data types and NULL values. Any help is appreciated. Basically an unload to Access.

share|improve this question
    
All the ESRI literature I have seen only covers the reverse, getting ACCDB files into ArcMap using an OLE DB connection, so great question! –  blah238 Dec 9 '11 at 18:33
    
Do you have the Data Interoperability Extension or FME? If so that would probably be a lot easier to use than PYODBC. –  blah238 Dec 9 '11 at 18:52
1  
I've not tried this but can't you simply use the Table to Table tool? Set up your OLE DB connection to Access in ArcCatalog then use the Table to Table geo-processing tool? –  Hornbydd Dec 10 '11 at 17:45
    
Hronbydd - I don't believe that ESRI provides write capabilities to an ole db connection string for Access 2007 - i have tried this and the tool failed, that is why i have begun going down the PYODBC path. –  dklassen Dec 12 '11 at 16:58

2 Answers 2

up vote 0 down vote accepted

Along the lines of this question, I wonder if you could pull the table out of the file geodatabase into a text file, then programmatically slurp the text file into Access? Here is a post on Stackoverflow to check out and here is a blog post on using Python with ADO.

share|improve this answer
    
This is basically what i have created. I have used the pyodbc library to connect to the Access DB and then looped through the File GDB table and create a series of Insert SQL Statements for the Access DB. Then execute them. Seems to work fine, but keeping track of all the possible data types is a bit overwhelming. –  dklassen Jul 6 '12 at 6:00

Untested, but this should work: Create a personal geodatabase, import file-gdb into that, then open the resulting .mdb in Access 2007 and upgrade it from the Access side. If any of the source feature classes exceed 2gb you'll need to do add some logic for splitting things into pieces and recombining.

share|improve this answer
    
Yes this would work, unfortunately i want to add my table to an existing working database. We have an ongoing project that tables need to be added to monthly and this DB is already built in the ACCDB format. Thanks –  dklassen Dec 16 '11 at 23:33
    
@dklassen, in that case what about using table-to-table to export and then suck them in on the Access side as linked tables? If the table names are predictable or static every time the Access db is opened they'll be current. –  matt wilkie Dec 20 '11 at 5:13

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.