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的更多相关文章

  1. 关于Natively Compiled Stored Procedures的优化

    Interpreted Transact-SQL stored procedures are compiled at first execution, in contrast to natively ...

  2. An Introduction to Stored Procedures in MySQL 5

    https://code.tutsplus.com/articles/an-introduction-to-stored-procedures-in-mysql-5--net-17843 MySQL ...

  3. MySQL Error Handling in Stored Procedures 2

    Summary: this tutorial shows you how to use MySQL handler to handle exceptions or errors encountered ...

  4. Why Stored Procedures?

    http://www.w3resource.com/mysql/mysql-procedure.php Stored procedures are fast. MySQL server takes s ...

  5. [转]Oracle Stored Procedures Hello World Examples

    本文转自:http://www.mkyong.com/oracle/oracle-stored-procedures-hello-world-examples/ List of quick examp ...

  6. [转]How to: Execute Oracle Stored Procedures Returning RefCursors

    本文转自:http://www.telerik.com/help/openaccess-orm/openaccess-tasks-oracle-execute-sp-result-set.html I ...

  7. 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 ...

  8. 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 ...

  9. [MySQL] Stored Procedures 【转载】

    Stored routines (procedures and functions) can be particularly useful in certain situations: When mu ...

随机推荐

  1. elment 中 el-table 进行校验

    脑洞大开:什么是展示数据最好的方式呢,表格,写得又快,又清晰,又明显,那么就积累一些工作中表格经常使用到的东西. 第一步:效果图: 第二步:举个例子: <template> <div ...

  2. golang使用etcd实现分布式锁

    package main import ( "context" "fmt" "time" "go.etcd.io/etcd/cli ...

  3. 【HNOI2019】部分题简要题解

    题意懒得写了 LOJ Day 1 T1 鱼 个人做法比较猎奇,如果有哪位大佬会证明能分享一下的话感激不尽. 题解:枚举鱼尾和鱼身的交点D,将所有其他点按照到D的距离排序,距离相同的分一组. 感性的理解 ...

  4. 一种很有意思的数据结构:Bitmap

    昨晚遇到了一种很有意思的数据结构,Bitmap. Bitmap,准确来说是基于位的映射.其中每个元素均为布尔型(0 or 1),初始均为 false(0).位图可以动态地表示由一组无符号整数构成的集合 ...

  5. webService基本概念、元素及简单编码实现

    webService "网络服务"(Web Service)的本质,就是通过网络调用其他网站的资源. 网络服务是相对于本地服务来说的,本机完成本机需要完成的任务,叫"本地 ...

  6. 微服务Kong(五)——添加一个用户(Consumer)

    在本节中,我们将学习如何添加一个用户(consumer)到KONG实例中.用户是与使用您的API的个人相关联,可用于跟踪,访问管理等. NOTE:本节假设您已经正确启用了密钥验证插件.如果没有,请参考 ...

  7. Linux 设置代理时, 密码出现特殊字符怎么办?

    配置代理的格式一般是这样的: $ export https_proxy=https://用户名:密码@代理地址:代理端口 比如需要配置这些: $ export http_proxy=http://Co ...

  8. TreeMap红黑树

    Java TreeMap实现了SortedMap接口,也就是说会按照key的大小顺序对Map中的元素进行排序,key大小的评判可以通过其本身的自然顺序(natural ordering),也可以通过构 ...

  9. IE浏览器上传文件后返回结果会自动弹出下载框

    服务器使用的是node,其它语言的后台没测试过. 在IE低版本浏览器下,当你上传一个文件后后台会返回一些数据,但是IE浏览器会弹出下载提示. 这个问题是之前处理的了,没有细究,今天有人问到这个问题,顺 ...

  10. Android Studio 连接 逍遥模拟器

    1.启动 逍遥模拟器: 2.打开 Android Studio 项目: 3.命令行 adb connect 127.0.0.1:21503 C:\Users\Administrator>adb ...