Use .mdb file instead of SQLite in iOS app ? - iphone

How can I use the .mdb file instead of SQLite, I am working on a project that will load and update data from .mdb file. I search about it but can't found anything can you poeple guide me.

MDB Tools is an opensource project that aims to bring support of the prorpietary MDB file format of Microsoft Access to POSIX systems. Since it's written in pure C, it should be fairly easy to integrate this project in your iOS app. (You should specifically be looking at its libmdb part.)

.mdb is not supported with iOS API. You should convert your .mdb file into sqlite file to access through iOS API.

Related

core data : phpmyadmin equivalent

In my app, I have a pretty huge datamodel and its .sqlite data file.
I would like to parse my records in the .sqlite file, and I'm wondering if there was a tool, like phpMyAdmin.
It would be an xCode tool, for example, or maybe a custom app downloadable on the web.
Does anyone know that kind of tool ?
There are any number of SQLite readers available, but SQLite Manager is popular:
https://addons.mozilla.org/en-US/firefox/addon/sqlite-manager/
i like the Core Data Editor, but it is quite expensive (23,99€)
Website:
http://christian-kienle.de/CoreDataEditor
Mac App Store:
http://itunes.apple.com/de/app/core-data-editor/id403025957?mt=12
the cool thing is, that core data editor is even able to generate (good and readable) code

How to unzip a zip file shared through iTunes from the Application Programmatically?

I need to unzip file synced through itunes in the documents directory programmatically. There are open source frameworks available like ZipArchive and ZipKit but I am not able to use them in the project. Is there a decent tutorial where I can see how to use these frameworks.
you can use SSZipArchive.
It is so simple way to unzip file. please read Readme.markdown (usage).
Simple three lines and that's it.
For ZipKit, you need to use the Better Way of Installing the Framework and follow the Static Library section of the ZipKit Documentation because iOS doesn't allow you to use to embed the Frameworks directly. You need to include it as a Static Library.
Alternatively you could use something lightweight like iZip

how can previous versions of office files be accessed using open xml sdk 2.0

I suppose office files(prior MS office 2007) cannot be accessed using open xml sdk2.0 or if they cannot be programmatically accessed using the open xml format.
so is there any way to work or these older version files or can i view the xml content of these files.
or is it that open xml sdk isnt designed for that purpose
See the answer to a similar question I asked when I just started learning this SDK.
No but the open source project POI provides an API to most of the old formats. Warning POI is a bit (not a lot) buggy, does not fully implement the specs, and support is catch as catch can (ie it's open source).
You can use Office File converters to convert to open xml formats and start processing it.
See here:
http://technet.microsoft.com/en-us/library/cc179019(v=office.14).aspx
I'm using this for my application. This works for me.
Hope this helps.

Is there a way to access AddressBook db file programmatically?

i need to copy this database file and save it in someother location or i can take backup of the db file. is there a way to do this programmatically.
Thanks
Satish
Unless you've jailbroken your iPhone, there's no way of accessing the sqlite3 database directly on the phone.
If you're talking about getting access to the database from your computer, you can do it by grabbing the database files out of the iPhone backup files. To do that, you'll need to grab a copy of Erica Sadun's mdhelper (binary file) command line utility, and run it from the PC you sync your laptop with like so:
mdhelper -files "AddressBook.sqlitedb" -extract -glob
This will create a "~/Desktop/Recovered iPhone Files" directory containing a file called AddressBook.sqlitedb, which you can access directly or query using your programming language of choice.
If you don't trust downloading and running binary files without knowing what they do, you can look at the source on Github and compile it yourself.
the SQL database can be extracted from an iphone backup. I used this software to grab mine and the SMS database.
If you have lots of images/videos in camera roll it can take a while to run.
http://www.supercrazyawesome.com/
Yeah sorry abt that. ok thanks probably i will create a new database using AddressBook Apis
-Satish
You can also take a backup of your iphone and than use one of tools discribed here to identify the file you need.

Add an SQLite database to an iPhone app

I am trying to learn SQLite, and I am building an iPhone app. But I would like to add an SQLite database to my building app. I have got three tutorials, but I am not clear on that code.
How can I add an SQLite database to my building app? What would sample code look like?
First of all you need to create your database.
From the command line create your db file.
sqlite3 mydb.db
Then create the tables within your database
CREATE TABLE tags (id int(5), name varchar(255), created_at datetime, updated_at datetime);
Repeat that for any tables that you want in your database.
Then you need to include the database file in your project. Add the existing database file to your project as you would any other existing file.
Next you will have to link in the framework to interact with the database. This can be found under you current iPhone SDK folder.
/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS2.2.sdk/usr/lib/libsqlite3.0.dylib
Finally you have to include the header file sqlite3.h from
/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS2.2.sdk/usr/include/sqlite3.h
It should now be possible to write code to access your sqlite database from within your iPhone application.
There is lots of information on the web.
Have you looked at the demo application? SQLite Book List This shows examples of common database functions under SQLite. This is effectively using the standard SQLite C APIs.
There are Objective C wrappers which may suite you more.
EntropyDB, SQLitePersistenceObjects and FMDB.
I found this Tutorial and this list of resources which may help.
Recently I've been using an ORM SQLite.net It is the way to go for me but then I'm developing in MonoTouch C#.
Tony
I'd also recommend looking at FMDB. It makes using SQLite slightly more Objective-C/Cocoa-like. It's not a full ORM wrapper or anything though; it just wraps the C API into something a bit more flavoursome.
http://sqlite.org/docs.html is a good place to start.
You might get more useful help if you are more specific about what you are trying to do, and what obstacles you are encountering.
If you use Firefox, there's this handy addon that you can use to manage and create an SQLite database.
you will have to link in the framework to interact with the database. This can be found under you current iPhone SDK folder.
/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS2.2.sdk/usr/lib/libsqlite3.0.dylib
CoreData should help, but I can't find it anywhere in the list of importable Frameworks.
You could take a peek at the iPhone examples, especially the SQLite Book List example.