Working C# code for MySql5.5 Stored Procedures IN parameters
MySQL5.5存储过程:
#插入一条 涂聚文
DELIMITER $$
DROP PROCEDURE IF EXISTS `geovindu`.`proc_Insert_BookKindList` $$
CREATE PROCEDURE `geovindu`.`proc_Insert_BookKindList` (IN param1Name NVarChar(1000),IN param1Parent Int)
BEGIN
insert into BookKindList(BookKindName,BookKindParent) values(param1Name,param1Parent);
END $$
DELIMITER ;
///<summary>
/// 追加记录
///</summary>
///<param name="BookKindListInfo"></param>
///<returns></returns>
public int InsertBookKindList(BookKindListInfo bookKindList)
{
int ret = 0;
try
{
MySqlParameter[] par = new MySqlParameter[]{
new MySqlParameter("?param1Name",MySqlDbType.VarChar,1000),
new MySqlParameter("?param1Parent",MySqlDbType.Int32,4),
};
par[0].Value = bookKindList.BookKindName;
par[1].Value = bookKindList.BookKindParent;
ret = MySqlHelpDu.ExecuteSql("proc_Insert_BookKindList", CommandType.StoredProcedure, par);
}
catch (MySqlException ex)
{
throw ex;
}
return ret;
}
using MySql.Data; //6.9.5.0 涂聚文注释,装的5.5的MYSQL版本,而要调用更高版本Connector/Net
using MySql.Data.MySqlClient;
Working C# code for MySql5.5 Stored Procedures IN parameters的更多相关文章
- 关于Natively Compiled Stored Procedures的优化
Interpreted Transact-SQL stored procedures are compiled at first execution, in contrast to natively ...
- An Introduction to Stored Procedures in MySQL 5
https://code.tutsplus.com/articles/an-introduction-to-stored-procedures-in-mysql-5--net-17843 MySQL ...
- MySQL Error Handling in Stored Procedures 2
Summary: this tutorial shows you how to use MySQL handler to handle exceptions or errors encountered ...
- Why Stored Procedures?
http://www.w3resource.com/mysql/mysql-procedure.php Stored procedures are fast. MySQL server takes s ...
- [转]Oracle Stored Procedures Hello World Examples
本文转自:http://www.mkyong.com/oracle/oracle-stored-procedures-hello-world-examples/ List of quick examp ...
- [转]How to: Execute Oracle Stored Procedures Returning RefCursors
本文转自:http://www.telerik.com/help/openaccess-orm/openaccess-tasks-oracle-execute-sp-result-set.html I ...
- Drop all the tables, stored procedures, triggers, constraints and all the dependencies in one SQL statement
Is there any way in which I can clean a database in SQl Server 2005 by dropping all the tables and d ...
- Home / Python MySQL Tutorial / Calling MySQL Stored Procedures in Python Calling MySQL Stored Procedures in Python
f you are not familiar with MySQL stored procedures or want to review it as a refresher, you can fol ...
- [MySQL] Stored Procedures 【转载】
Stored routines (procedures and functions) can be particularly useful in certain situations: When mu ...
随机推荐
- 负载均衡群集LB
负载均衡群集是目前企业用得最多的群集类型,通过主节点负载调度器(Director),使用特定的分流算法,将来自客户机的访问请求分担给多个服务器节点共同处理,从而缓解整个系统的负载压力,响应更多请求:群 ...
- VS中工程的“依赖”,“库目录”,“包含目录”
写多了Vs中的工程,就会遇到很多环境配置问题,例如“依赖项”,“库目录”,“包含目录”等等等等. 今天要记录的就是这些的基本含义:我们拿一个例子来看,更加清晰易懂一些: 例如在Opencv3.0+VS ...
- 配置 CentOS 7 安装位置
红框里是CentOS 7安装程序检测到的硬盘,选择你想把系统安装到哪个硬盘当中. 点击 Add disk 按钮可以添加指定的附加设备或者网络设备(通过ISCSI.FCoE等方式添加硬盘) 此处设置分区 ...
- C++类的构造函数及定义
定义一个普通的类时,一定要定义它自己的构造函数.原因有三:第一个原因是编译器只有在发现类不包含任何构造函数的情况下才会替我们生成一个默认的构造函数,一旦我们定义了一些其他的构造函数,那么除非我们再定义 ...
- 洛谷 P5238 整数校验器
题目描述 有些时候需要解决这样一类问题:判断一个数 x 是否合法. x 合法当且仅当其满足如下条件: x 格式合法,一个格式合法的整数要么是 0,要么由一个可加可不加的负号,一个 1 到 9 之间的数 ...
- [性能测试]:关于消费类ISO8583协议脚本的开发
一,要发送的报文,转化成16进制的,报文如下 "\x01\x52"//报文长度338 "\x60\x00\x24\x00\x00"//TPDU "\x ...
- order by关键字
作用:用于对查询结果进行排序 select * from emp where deptno = 20 order by sal 1.如何决定升序还是降序 默认排序:升序:select * from e ...
- 基于Cython和内置distutils库,实现python源码加密(非混淆模式)
起因 python本身只能做混淆,不能加密,多年的商业软件开发经验导致有某种"洁癖"欲望,将py编译打包 尝试 pyinstaller原理是freeze打包pyc文件,利用工具可完 ...
- 非常不错的app和网站
置顶: word.pdf之间相互转换的网站: https://www.addpdf.cn 很棒啊 1. Global Potplayer 这个软件简直了,播放各种视频, 无论是本地的,还是在线的,都非 ...
- WCF系列教程之WCF服务宿主与WCF服务部署
本文参考自http://www.cnblogs.com/wangweimutou/p/4377062.html,纯属读书笔记,加深记忆. 一.简介 任何一个程序的运行都需要依赖一个确定的进程中,WCF ...