Question

I have an old .gdb file from an Interbase V5 database from Delphi that is 20 years old that we need to transfer to a MS SQL database. We want to create a .csv or .dbf file from the .gdb file so we can import it to MS SQL using SSMS.


We have tried using FME but it always generates an error saying that it "Could not open File Geodatabase dataset". Below is the log error:

 

FME API version of module 'FILEGDB' matches current internal version (3.8 20210302) Geodatabase Error (-2147024893): The system cannot find the path specified. Could not open File Geodatabase dataset `C:\\Users\\guillermo.rendon\\OneDrive - SYSTEMWARE INC\\Documents\\PCS\\Database Tables\\SYSAPP1CLONE copy of PCS database\\SWIS.GDB' for reading FILEGDB reader: A fatal error has occurred. Check the logfile above for details Failed to obtain any schemas from reader 'FILEGDB' from 1 datasets. This may be due to invalid datasets or format accessibility issues due to licensing, dependencies, or module loading. See logfile for more information FME Session Duration: 0.3 seconds. (CPU: 0.0s user, 0.2s system)

END - ProcessID: 23880, peak process memory usage: 44604 kB, current process memory usage: 44120 kB


12 replies

Badge +9

Hi grendon,

 

FME has made an article about another error, check it out: https://community.safe.com/s/article/esri-file-geodatabase-api-error-2147220965-geodata

 

Maybe your error can be fixed by upgrading the FGDB as well. Otherwise you can try moving the geodatabase to a non Onedrive location and attempt to read it with FME. Another option is to try and read it with the Open API File Geodatabase reader. If none of the options work it might be usefull to post your FME version so that other people might be able to help you.

Userlevel 5
Badge +25

Are you sure this is actually an ESRI File Geodatabase? If it's a single file rather than a folder it isn't and you shouldn't use the Geodatabase reader. Not sure what the best approach is though.

Are you sure this is actually an ESRI File Geodatabase? If it's a single file rather than a folder it isn't and you shouldn't use the Geodatabase reader. Not sure what the best approach is though.

No, I am not sure it is an 'ESRI File Geodatabase'. It is a single file from what I can gather. I don't see it in a folder with other supporting/related files. Right now the way we look at the contents is by using 'IB_SQL' which seems to be an 'Interbase Objects' application v4.2.EG. I actually used this app to try and export it to a .csv but that doesn't look very good. The only thing that was half way usable was the .dbf export file. But even it has some issues. I am trying to run the latest version of 'IB_SQL' to see if they figured out the .dbf issues in the current version I am using.

Hi grendon,

 

FME has made an article about another error, check it out: https://community.safe.com/s/article/esri-file-geodatabase-api-error-2147220965-geodata

 

Maybe your error can be fixed by upgrading the FGDB as well. Otherwise you can try moving the geodatabase to a non Onedrive location and attempt to read it with FME. Another option is to try and read it with the Open API File Geodatabase reader. If none of the options work it might be usefull to post your FME version so that other people might be able to help you.

Thanks birgit, I will give those fixes a try and see what happens.

Badge +9

Thanks birgit, I will give those fixes a try and see what happens.

https://community.safe.com/s/question/0D54Q000080hUwSSAU/interbase-ingressFrom what you have told redgeographics it seems that it might not be a correct File Geodatabase so my tips might not help you. A file geodatabase is always a folder which contains files with extensions such as .gdbindexes, .gdbtable and .gdbtblx. I have created some file geodatabases in the older versions such as 9.2, 9.3 and 10.0 but all of them are folders so I don't think that the file you have as it is now is a valid .gdb as defined by ESRI.

 

After doing some extra research it looks like the Interbase .gdb format is absolutely not a file geodatabase. Does the original database still exist? if so maybe you can connect to it through FME : https://community.safe.com/s/question/0D54Q000080hUwSSAU/interbase-ingress

 

Also if that is not an option or too much work you can take a look at this question at stackoverflow: https://stackoverflow.com/questions/35570812/opening-gdb-database-files

It looks like the program that is mentioned also has csv export options.

 

Userlevel 5
Badge +25

No, I am not sure it is an 'ESRI File Geodatabase'. It is a single file from what I can gather. I don't see it in a folder with other supporting/related files. Right now the way we look at the contents is by using 'IB_SQL' which seems to be an 'Interbase Objects' application v4.2.EG. I actually used this app to try and export it to a .csv but that doesn't look very good. The only thing that was half way usable was the .dbf export file. But even it has some issues. I am trying to run the latest version of 'IB_SQL' to see if they figured out the .dbf issues in the current version I am using.

Considering this is a very old database format I think your options may be limited. I used to program in Delphi 20-ish years ago and Interbase does ring a bell 😉 But there doesn't seem to be a native way to import this into FME (except maybe through ODBC?)

 

What kind of issues are you seeing with the DBF file? Do they look fixable in FME? If this is a one-time process it may be worth considering.

No, I am not sure it is an 'ESRI File Geodatabase'. It is a single file from what I can gather. I don't see it in a folder with other supporting/related files. Right now the way we look at the contents is by using 'IB_SQL' which seems to be an 'Interbase Objects' application v4.2.EG. I actually used this app to try and export it to a .csv but that doesn't look very good. The only thing that was half way usable was the .dbf export file. But even it has some issues. I am trying to run the latest version of 'IB_SQL' to see if they figured out the .dbf issues in the current version I am using.

The DBF file does not import the "blob" columns ( columns with object variables with no type that include text), it also does not import the time stamp in the date columns, only the date and the time shows up with all zeroes. It also inserts columns that are not in the tables called "Time_*" which may or may not have a date value in them. This is the best export however from IB_SQL which I use to look at and export tables from the GDB file.

Badge +8

Hi @grendon​ 

I think what you have is not a Esri File geodatabase but instead an Interbase Database, which use to have extensions as .GDB and .FDB

It may be possible to use Firebird to open the file and possibly export it to a different format, as this format is still open source and might be able to connect see here https://firebirdsql.org/en/server-packages/ 

Additionally, you should be able to use Python to import the data (you may need the python driver from the above link) 

import firebirdsql
 
conn = firebirdsql.connect(
    host='192.168.133.121', # your host IP address
    database='E:\\test\test.gdb', # path to your database 
    port=3050,
    user='sysdba',
    password='masterkey'
    #charset="WIN1251"
    #charset="UTF8"
 
)
cur = conn.cursor()
cur.execute("select column1 from table1")
for c in cur.fetchall():
    print(c)
conn.close()

Another option would be to use ODBC / JDBC drivers to connect to the database. 

No, I am not sure it is an 'ESRI File Geodatabase'. It is a single file from what I can gather. I don't see it in a folder with other supporting/related files. Right now the way we look at the contents is by using 'IB_SQL' which seems to be an 'Interbase Objects' application v4.2.EG. I actually used this app to try and export it to a .csv but that doesn't look very good. The only thing that was half way usable was the .dbf export file. But even it has some issues. I am trying to run the latest version of 'IB_SQL' to see if they figured out the .dbf issues in the current version I am using.

I tried many things that did not work. In the end I just did a single column export of the table to a txt file. Then I wrote a program to reformat the blob text and annotations to lines that I can put into a .csv file and then import into my MS SQL database.

 

I just thing that Interbase is such an old database that there was nothing really out there I could find that could migrate a whole table and still keep the integrity of the data.

 

Thanks for you help. It assisted me in eliminating many possibilities and figuring out how to solve this issues. We should have never kept working with a database that was 25 years old.

Hi @grendon​ 

I think what you have is not a Esri File geodatabase but instead an Interbase Database, which use to have extensions as .GDB and .FDB

It may be possible to use Firebird to open the file and possibly export it to a different format, as this format is still open source and might be able to connect see here https://firebirdsql.org/en/server-packages/ 

Additionally, you should be able to use Python to import the data (you may need the python driver from the above link) 

import firebirdsql
 
conn = firebirdsql.connect(
    host='192.168.133.121', # your host IP address
    database='E:\\test\test.gdb', # path to your database 
    port=3050,
    user='sysdba',
    password='masterkey'
    #charset="WIN1251"
    #charset="UTF8"
 
)
cur = conn.cursor()
cur.execute("select column1 from table1")
for c in cur.fetchall():
    print(c)
conn.close()

Another option would be to use ODBC / JDBC drivers to connect to the database. 

Thanks, I think this gave me the idea to just write my own program in C# to extract the data and keep its integrity. Actually, writing my own program took me less time than doing all the research to find other apps that could help me do it. Thanks again!

Thanks birgit, I will give those fixes a try and see what happens.

Just ended up writing my own program to extract data from blob columns. It took me less time than running around trying different fixes. Thanks for your help, all the great advice helped me eliminated options and choose to write a custom program to get what I wanted.

Userlevel 5
Badge +25

No, I am not sure it is an 'ESRI File Geodatabase'. It is a single file from what I can gather. I don't see it in a folder with other supporting/related files. Right now the way we look at the contents is by using 'IB_SQL' which seems to be an 'Interbase Objects' application v4.2.EG. I actually used this app to try and export it to a .csv but that doesn't look very good. The only thing that was half way usable was the .dbf export file. But even it has some issues. I am trying to run the latest version of 'IB_SQL' to see if they figured out the .dbf issues in the current version I am using.

You're welcome! I don't think the age of the format is the main issue here though (heck, Shape, AutoCAD, DGN, DBF, MapInfo and countless other formats have been around for that long), but rather the fact it wasn't very "connectable". In fact, it wasn't until you mentioned Delphi that the penny dropped for me (although I never bothered with database back when I was programming in Delphi...)

Reply