在Android中使用数据库 [英] Using database in Android

查看:173
本文介绍了在Android中使用数据库的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有没有人知道在Android上使用sqlite的一步一步教程?

Does anyone know a good step by step tutorial for using sqlite on Android?

我发现这个: http://developer.android.com/guide/topics/data/data-storage.html#db

I've found this: http://developer.android.com/guide/topics/data/data-storage.html#db and it ok to start with, but then it wants me to jump into other source code then its difficult to follow.

我已经尝试过其他人在网络上,但是,一个来自尖叫的企鹅,只是一直导致与JVM的错误。

I've tried others on the web, one from screaming penguin and that just kept causing errors with JVM.

忠告非常感激。


  • 使用多个表(自动ID,声明类型)创建数据库

  • li>
  • get

推荐答案

http: //www.anddev.org/working_with_the_sqlite-database_-_cursors-t319.html

它还创建一个包含一个表的数据库(我认为它应该是容易适应几个表),它使用als get。

It also creates a database with one table (i think it should be easy to adapt to several table) and it uses als gets. Update is mentioned in this tutorial.

然后我也使用了这个:

http://www.reigndesign.com/blog/using-your -own-sqlite-database-in-android-applications /

但是不幸的是这个代码不是为2.1(确定我只是注意到,

But unfortunately this code isn't for 2.1 (ok I just noticed that you don't mentioned for which version you want to develop)

如果您了解德语,本教程也非常有用:

If you understand German, this tutorial is also very useful:

http://android-developers.de/tutorials- faqs / der-umgang-sqlite-404.html

这里(中间某处)解释了如何更新数据库:

And here (somewhere in the middle) it is explained how to update database:

http: //www.higherpass.com/Android/Tutorials/Accessing-Data-With-Android-Cursors/

这篇关于在Android中使用数据库的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆