1.更改数据库版本号(每次更新都一定要进行版本的升级)
2.更新语句一条一条写,不能并列写
例如:
public void onUpgrade(SQLiteDatabase db, int arg1, int arg2) {
db.execSQL("alter table users add userage integer;alter table users add usersalary ...
分类:
数据库 时间:
2014-06-20 11:43:30
阅读次数:
268
查询已经创建的数据库 show dbs
选择数据库
use DATABASE_NAME
查询该数据库里面的集合 show collections
删除集合操作:
db.COLLECTION_NAME.drop()
插入数据操作:
db.COLLECTION_NAME.insert(
do...
分类:
数据库 时间:
2014-06-20 10:57:41
阅读次数:
275
【题目】
Given a binary tree, return the bottom-up level order traversal of its nodes' values. (ie, from left to right, level by level from leaf to root).
For example:
Given binary tree {3,9,20,#,#,15,7},
3
/ 9 20
/ 15 7
return its b...
分类:
其他好文 时间:
2014-06-20 09:42:30
阅读次数:
224
要查看数据库,首先必须要找到db文件,如果拷贝到电脑上,查看的方法比较多,在手机上,用命令查看比较直接和方便。首先要找到数据库的位置,一般数据库时存放在程序的私有目录,所以要获取root权限。确保开发工具已经连接上手机,打开命令行,输入adb
shell这时还没有获取root权限,输入su,手机会弹...
分类:
移动开发 时间:
2014-06-11 23:35:53
阅读次数:
365
一直想做一个自己的简单的 DBHelper
。没有其他原因,只是其他的轮子用起来感觉太重了。设计的大体思路如下:大体方向:生成一个简单版本的DB层,需要支持数据库
MySql,Oracle,SqlServer的操作。有一个简单的配置工具,支持代码生成器。可以脱离数据库的主外键关系,而自动设置关系进去...
分类:
数据库 时间:
2014-06-11 22:08:18
阅读次数:
310
ssh
narnia3@narnia.labs.overthewire.org密码:OOXX(上一关拿到的密码)cat narnia3.c#include
#include #include #include #include #include #include int main(int argc....
分类:
其他好文 时间:
2014-06-11 09:59:03
阅读次数:
347
public voidnotifyDataSetChanged()Added inAPI
level 1Notifies the attached observers that the underlying data has been changed
and any View reflecting ...
分类:
移动开发 时间:
2014-06-11 07:44:51
阅读次数:
270
在Froyo(android 2.2,API
Level:8)中引入了android:installLocation.通过设置该属性可以使得开发者以及用户决定程序的安装位置.android:installLocation隶属于AndroidManifest.XML中的manifest节点.如下所.....
分类:
移动开发 时间:
2014-06-08 07:39:24
阅读次数:
384
建立bat文件rem 关闭explorer.exetaskkill /f /im
explorer.exeattrib -h -i %userprofile%\AppData\Local\IconCache.dbdel
%userprofile%\AppData\Local\IconCache.db...
将原来的数据库删除,然后进入data文件夹中修改名字,但是后来前台出现错误:Zend_Db_Statement_Exception Object (
[_previous:Zend_Exception:private] =>
[。。。。。。。。。。。。。。。。。。很多乱码,看不懂。于是将两个数据库都...
分类:
数据库 时间:
2014-06-07 07:07:34
阅读次数:
336