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

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

问题描述

有谁知道一步教程一个很好的一步为使用SQLite在Android?

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

我发现这一点:的http://开发商。 android.com/guide/topics/data/data-storage.html#db ,然后确定就可以了下手,但它想让我跳进其他来源的code,那么它的难走。

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.

建议大大AP preciated。

Advice greatly appreciated.

我需要:

  • 创建的数据库,拥有数表(自动识别,声明类型)
  • 更新
  • 获得

推荐答案

由于一开始我用这一个:

As a start I use this one:

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

它也有一个表(我认为它应该很容易适应多个表)创建一个数据库,它使用ALS得到。更新中提到的本教程。

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/

不过遗憾的是这个code不是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-常见问题解答/ 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天全站免登陆