sqlite3*db=[DatabaseopenDB];sqlite3_stmt*stmt=nil;NSString*sqlString=[NSStringstringWithFormat:@"insertintoStudent(name,age,gender)values(‘%@‘,%ld,‘%@‘)",studnt.name,(long)studnt.age,studnt.gender];intresult=sqlite3_prepare_v2(db,[sqlStringUTF8String],-1,&a..
分类:
数据库 时间:
2014-09-20 02:21:36
阅读次数:
239
sqlite3*db=[DatabaseopenDB];sqlite3_stmt*stmt=nil;NSString*sqlstring=[NSStringstringWithFormat:@"updateStudentsetname=‘%@‘whereid=%ld",name,(long)ID];intresult=sqlite3_prepare_v2(db,[sqlstringUTF8String],-1,&stmt,NULL);if(result==SQLITE_OK){if(sqlite3_s..
分类:
数据库 时间:
2014-09-20 02:21:27
阅读次数:
177
sqlite3*db=[DatabaseopenDB];sqlite3_stmt*stmt=nil;NSString*sqlString=[NSStringstringWithFormat:@"deletefromStudentwhereid=%d",ID];intresult=sqlite3_prepare_v2(db,[sqlStringUTF8String],-1,&stmt,nil);if(result==SQLITE_OK){if(sqlite3_step(stmt)==SQLITE_DON..
分类:
数据库 时间:
2014-09-20 02:21:17
阅读次数:
310
prepare("select id, name, price, num, desn from shops where id>?");$stmt->bind_param("i", $id);$stmt->bind_result($id, $name, $price, $num, $desn);$id...
分类:
数据库 时间:
2014-09-14 12:39:57
阅读次数:
218
一、常用方法sqlite3 *db, 数据库句柄,跟文件句柄FILE很类似sqlite3_stmt *stmt, 这个相当于ODBC的Command对象,用于保存编译好的SQL语句sqlite3_open(), 打开数据库,没有数据库时创建。sqlite3_exec(), 执行非查询...
分类:
移动开发 时间:
2014-08-21 12:56:54
阅读次数:
251
这个测试的目的是验证当前常用数据库连接池的性能。testcase Connection conn = dataSource.getConnection(); PreparedStatement stmt = conn.preparedStatement("select 1"); ResultS...
分类:
数据库 时间:
2014-08-05 21:47:40
阅读次数:
357
# pwd && ls -a -l /? drwxrwxrwt root ? ? root ? ? ? ? ? ? ?2009-06-10 09:53 sqlite_stmt_journals? drwxrwx--- system ? cache ? ? ? ? ? ? 2008-09-06 22:51 cache? d---rwxrwx system ...
分类:
移动开发 时间:
2014-07-26 03:38:27
阅读次数:
437
非select 语句(没有结果集的)1.建立连接数据库 $mysqli=new mysqli("localhost","root","","sqldb");2.判断 if(mysqli_connect_error()){ echo "连接数据库失败".mysqli_connect_erro...
分类:
数据库 时间:
2014-07-18 10:16:11
阅读次数:
292
原始代码如下:begin DECLARE @SQL_STMT NVARCHAR(300),@V_CLIENT_ID INT,@V_PGNAME VARCHAR(1000),@V_LOGID INT;DECLARE C2 CURSOR FOR SELECT PGNAME,CLIENT_ID FROM ...
分类:
其他好文 时间:
2014-07-16 10:57:40
阅读次数:
217
public static void main(String[] args) { ResultSet rs = null; Statement stmt = null; Connection conn = null; ...
分类:
数据库 时间:
2014-07-14 14:17:13
阅读次数:
236