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. Java_多线程

    线程(Thread) 1.线程是CPU进行资源调度的最小单位 2.线程是进程实际运行的单位,处理进程中无数的小任务 3.线程共享代码和数据空间 4.一个进程可以并发多个线程,线程之间切换系统开销很小 ...

  2. 【ASP.NET】DataTable导出EXCEL,弹窗提示下载保存(完整代码)

    //新建ASPX protected void Page_Load(object sender, EventArgs e) { DataTable dt = new DataTable(); Data ...

  3. SSAS 收藏

    1.多事实表 SQL实现和SSAS中MDX实现的差异 2.层次结构 3.MDX常用几种查询对比 4.一段话理解 MDX中的Select .轴.COLUMNS.ROWS 5.[转载]MSDN-MDX#0 ...

  4. 实验一 c++简单程序设计

    一.实验内容 1.ex 2_28 (1) 用if...else判断 #include<iostream> using namespace std; int main() { char i; ...

  5. CentOS 7 安装方式汇总

    U盘安装 通过U盘安装 CentOS 的过程和安装Windows非常相似,首先将 CentOS 镜像文件刻录到U盘(或者光盘),设置固件(BIOS或者UEFI)从U盘启动,然后逐步设置即可. 使用 V ...

  6. 使用二叉搜索树实现一个简单的Map

    之前看了刘新宇大大的<算法新解>有了点收获,闲来无事,便写了一个二叉搜索树实现的Map类. java的Map接口有很多不想要的方法,自己定义了一个 public interface IMa ...

  7. (Android 即时通讯) [悬赏],无论是谁发现一个漏洞奖励人民币1000元!

    悬赏,无论是谁发现一个漏洞奖励人民币1000元!   3Q Android 手机版即时通讯系统正式推出,可与电脑版 地灵(http://im.yunxunmi.com) 即时通讯系统互通!  适用于: ...

  8. redux在componentDidMount中出现的问题 --- state 不变

    遇到这样一个问题: 在组件的componentDidMount中,我需要使用到redux中存储的某个状态. 但是有趣的是,当我再render中使用相同的状态时,状态会改变,但是在conponentDi ...

  9. 【Maven学习】maven中依赖的配置详解

    根元素project下的dependencies可以包含一个或者多个dependency元素,以声明一个或多个项目依赖.每个依赖可以包含的元素有: groupId,artifactId和version ...

  10. javascript004引用类型

    –掌握数组的概念.特性.常用方法(重点) –掌握Object,学会使用对象(重中之重) –了解其他引用类型对象 一:数组 •在ECMAScript中数组是非常常用的引用类型了.ECMAScript所定 ...