首 页文章中心下载中心繁體中文
设为首页
加入收藏
联系我们
您当前的位置:开源盛世-源代码下载网 -> 文章中心 -> 数据库类 -> Oracle -> 文章内容 退出登录 用户管理
栏目导航
· MS Access · MS SQL
· MY SQL · DB2
· Oracle · Sybase
· 数据库相关
热门文章
· Tab Control控件使用...
· 学生档案管理系统
· [图文] 排列组合公式
· UTF-8与GB2312之间的...
· DirectShow下载安装...
· Virtual PC 在PAE模...
· Windows2000终端服务...
· MapInfo上的GIS系统...
· Mapbasic参考手册索...
· MapX应用开发中文讲...
相关文章
用libsqlora连接oracle
作者:不详  来源:vscodes.com整理  发布时间:2006-10-18 10:27:49  发布人:Polaris

减小字体 增大字体

/* Update one line */
int sth;
char *packet_name="lijm";
   char *update_stmt =
"UPDATE staff_info set ADDRESS = '22' where NAME = :1";
if (0 <= (sth = sqlo_prepare(dbh, update_stmt)))
{ if (SQLO_SUCCESS !=
(sqlo_bind_by_name(sth, ":1", SQLOT_CHR, packet_name, strlen(packet_name), 0, 0)
))
{ printf("sqlo_bind_param failed failed: %s\n", sqlo_geterror(dbh) );
return 0;
}
}
if (SQLO_SUCCESS != sqlo_execute(sth, 1))
{ printf("sqlo_execute failed: %s\n", sqlo_geterror(dbh) );
return 0;
}

/* commit */
int status;
if (SQLO_SUCCESS != (status = sqlo_commit(dbh))) {
printf("commit failed (%d): %sn", status, sqlo_geterror(dbh));
return 0;
}

End of《用libsqlora连接oracle》

[] [返回上一页] [打 印] [收 藏]
上一篇文章:Oracle应用Linux开发C
 
∷相关“用libsqlora连接oracle”文章评论∷
(评论内容只代表网友观点,与本站立场无关!) [更多评论...]
关于本站 - 网站帮助 - 广告合作 - 下载声明 - 友情连接 - 网站地图 网站目录 鄂ICP备06007162
开源盛世 版权所有Copyright © 2003-2005 VSCodes.Com. All Rights Reserved.