Trying to open ArcGIS created Dbf file in Sqlite3 - sqlite

I am using a GIS program called ArcGIS to create a .dbf file from shapefile data. I have tried opening the .dbf file in sqlite3. sqlite3 stated "Error: file is encrypted or is not a database". What is causing this error? Why can't I open the .dbf in sqlite3?
When I open the dbf file in Excel I have no issues.
Edit: I am new user to Stack Overflow. SO I am confused at why there no explaination for -1 Vote. What does it mean? And if I get no input into why down votes happen, how can I learn to write better questions?
Edit 2: Since getting an answer, I have researched more and understand better that dbf files are old format that has no SQL component to it. Originally I thought (wrongly) if dbf and sqlite are both databases then they must be compatible. When just starting out, basic questions to you may not be so basic to others.

A .dbf file is a dBase database file. SQLite is a different database system with a completely different database file format. SQLite clients are not made to handle .dbf files. So the behavior you see is expected.
If you really need to access this data with a SQLite client, you could use ArcGIS's Create SQLite Database tool and copy the data from the shapefile to a SQLite database.

Related

How to open SQLite3 database that has .edb extension

As you may see from the picture below there are few files:
.exe file which is reading data.edb file
sqlite3.dll which is obviously being used to read data.edb
data.edb contains all the data
Obviously SQLIte3 is being used to read the database, but I cannot load data.edb manually. Does anyone have any idea how to do it?

Unreadable .dbf file

I am trying to open a .dbf file. The file is from an application directory. I would just like to access the raw data, but I am having some difficulty.
I am not looking for a how to, but would appreciate someone pointing me to a where to get to my solution. I do not know if this file is encrypted, or if it is from foxpro, or if I am simply not opening the file with the correct application. I feel like this would have been created from something old as far as software.
Included is an image of what the data looks like when I open the file. This is in Visual Studio. I have tried it in other IDEs as well as just plain old excel.
That looks like an unencrypted DBF created by either FoxBase or FoxPro (pre-Visual FoxPro) or dBase III Plus or dBase IV. What happens when you try to open it in Excel?

Any way to convert Realm database file in to sqlite?

I have realm database (.realm) from an existing application, which has more than 400k records.
I dug my head in to this for more than 3-4 hours, but I couldn't find any fruitful results towards converting a .realm file in to a sqlite file.
Any data conversion so far has been done manually. People have converted from Core Data to Realm by grabbing the objects from Core Data and then saving them to a Realm.
I imagine your best bet will be similar here. Grab each object from the Realm and then convert it to the tables/rows/and columns in sqlite. Then you can take that file anywhere.
You can open the realm file in Realm Browser & there you have the option to convert the file in to CSV ( File => Export => CSV ). Then you can import that CSV file to mysql database.
If you want sqlite more specifically, You can import tables separately to your sqlite db through SQLiteBrowser . Create or open your database file and select the specific table you want , then you can import table from CSV.
I'm not at home with this, but I found this link hopefully it can help.

error while reading file into sqlite3

I am a newbie to sqlite3.
I have some files which contain a .db file and also another file which contains the definition s of many tables. I try to open with notepad and see that it has create table definitions of many files.
I am trying to read them in sqlite3 in linux.
I try to use .read FILENAME after which I try to see the tables by giving .tables command.
I cant see them.
Is there a way I need to source the file or execute.
Thanks for your help in advance
I haven't done anything with SQLite in a long time, but when I did work with it I used a Firefox extension that made it easy.
Check out SQLite Manager to open the DB file:
https://addons.mozilla.org/en-US/firefox/addon/sqlite-manager/
.read FILENAME already executes the sql script in the FILENAME. Check if your .db file is writable and/or if the sql contained your file is correct.

How to update MYSQL Database with data from Excel using ASP.NET?

I have an excel file which gets updated every 10 seconds through an automated process. I need excel data to be updated in MY-SQL database which is located on a remote server.
How do I do that?
I have thought of following option:
1) Every 11 seconds, an Excel macro will run and will "Save as" excel as CSV file. (not sure whether this can be done by macro...just thinking)
2) This CSV file we will FTP to remote server using Windows Service.
3) On remote server, we will parse the csv file and Update MYSQL database.
Is this approach fine? Or do you have a better approach which requires less time to update the database?
Thanks!
I found following links to be more useful:
http://www.heritage-tech.net/908/inserting-data-into-mysql-from-excel-using-vba/
http://vbaexcel.eu/vba-macro-code/update-mysql-database-php
I hope this helps someone having similar problem as mine.
You can connect to the Excel spreadsheet using ODBC connection, read the data, and post it to the MySQL database, maybe through some sort of web service access, or via a saved CSV file?

Resources