i am working on a application which needs connectivity with database i had create database and import it successfully but i dont know how connect it with code can any help me?
我正在开发一个需要与数据库连接的应用程序我已创建数据库并成功导入它但我不知道如何将它与代码连接可以帮助我吗?
2 个解决方案
#1
1
Let me google it for you.
让我谷歌给你。
-
http://dblog.com.au/iphone-development-tutorials/iphone-sdk-tutorial-reading-data-from-a-sqlite-database/
-
http://www.icodeblog.com/2008/08/19/iphone-programming-tutorial-creating-a-todo-list-using-sqlite-part-1/
#2
1
The sqlite framework is available on the iPhone, you first need to import it (it's called libsqlite3.0.dylib). Bear in mind that it's all in C so you have to be comfortable with that. There are already many tutorials on the Internet on how to use it in an iPhone application.
sqlite框架在iPhone上可用,首先需要导入它(它叫做libsqlite3.0.dylib)。请记住,这一切都在C中,所以你必须对此感到满意。互联网上已经有很多关于如何在iPhone应用程序中使用它的教程。
If you'd rather go the Objective-C way, there is an excellent wrapper around the sqlite C API for the iPhone called FMDatabase: https://github.com/lightory/fmdb
如果您更倾向于使用Objective-C方式,那么围绕用于iPhone的sqlite C API(称为FMDatabase)有一个很好的包装器:https://github.com/lightory/fmdb
Also, you could have a look at Core Data which, again, will do most of the nasty tasks for you.
此外,您还可以查看核心数据,这也将为您完成大部分令人讨厌的任务。
#1
1
Let me google it for you.
让我谷歌给你。
-
http://dblog.com.au/iphone-development-tutorials/iphone-sdk-tutorial-reading-data-from-a-sqlite-database/
-
http://www.icodeblog.com/2008/08/19/iphone-programming-tutorial-creating-a-todo-list-using-sqlite-part-1/
#2
1
The sqlite framework is available on the iPhone, you first need to import it (it's called libsqlite3.0.dylib). Bear in mind that it's all in C so you have to be comfortable with that. There are already many tutorials on the Internet on how to use it in an iPhone application.
sqlite框架在iPhone上可用,首先需要导入它(它叫做libsqlite3.0.dylib)。请记住,这一切都在C中,所以你必须对此感到满意。互联网上已经有很多关于如何在iPhone应用程序中使用它的教程。
If you'd rather go the Objective-C way, there is an excellent wrapper around the sqlite C API for the iPhone called FMDatabase: https://github.com/lightory/fmdb
如果您更倾向于使用Objective-C方式,那么围绕用于iPhone的sqlite C API(称为FMDatabase)有一个很好的包装器:https://github.com/lightory/fmdb
Also, you could have a look at Core Data which, again, will do most of the nasty tasks for you.
此外,您还可以查看核心数据,这也将为您完成大部分令人讨厌的任务。