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 ...
随机推荐
- mxonline实战3,编写首页及用户登录页面1
对应github地址:首页和用户登陆1 一. 显示首页 1. 修改mxonline/setttings.py 在TEMPLATES代码块修改DIRS为 'DIRS': [os. ...
- C#-WebForm 如何获取下拉列表选中的值 jquery
分别使用javascript原生的方法和jquery方法<select id="test" name=""> <option value=&q ...
- docker 暴露2375 端口。
网上找的.大多不能用...一下是我自己找了半天的方法...,可能是版本太旧的原因 下图解决方法: ubuntu: 18.04 docker: Docker version 18.09.2, build ...
- 03-树2 List Leaves (25 分)
Given a tree, you are supposed to list all the leaves in the order of top down, and left to right. I ...
- 如何给oneindex网盘增加评论、密码查看、read me,头提示功能。
来自我的博客:www.resource143.com 微信公众号:资源库resource 视频教程地址 点击查看 评论功能 特性 使用 GitHub 登录 支持多语言 [en, zh-CN, zh-T ...
- WPF实现WORD 2013墨迹批注功能
1 前言 WORD 2013可以使用墨迹在文档上面标注,本文讲述通过WPF第三方控件实现类似主要功能如下: 名称 描述 墨迹标注 不论是否触摸屏环境下可以开始墨迹功能,并实现鼠标/触摸在文档任意位置绘 ...
- Mac 10.12安装粘贴板增加工具ClipMenu
说明:这个工具可以保留复制过的记录,并且可以快速调出之前复制过的内容,最开发时比较常用,支持图片等. 下载: (链接: https://pan.baidu.com/s/1qXJbM2o 密码: wef ...
- 四大组件之Service
1 通过startService 1.1 与调用者相对独立,没有返回,用于播放音乐,下载文件 1.2 如果是调用者自己直接退出而没有调用stopService的话,Service会一直在后台运行.下次 ...
- python-TCP传输模型
#!/usr/bin/python #coding=utf-8 #服务器端 from socket import * from time import ctime HOST="192.168 ...
- 剑指offer(26-30)编程题
二叉搜索树与双向链表 字符串的排列 数组中出现次数超过一半的数字 最小的K个数 连续子数组的最大和 26.输入一棵二叉搜索树,将该二叉搜索树转换成一个排序的双向链表.要求不能创建任何新的结点,只能调整 ...