如何用c#.net中的参数调用mysql存储过程? [英] How to call mysql stored procedure with parameters in c#.net?

查看:169
本文介绍了如何用c#.net中的参数调用mysql存储过程?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是MySql的新手,也是从Visual Studio连接MySql。请帮助我,如何从Visual Studio连接到MySql以及如何使用c#.net中的参数调用mysql存储过程。

谢谢和问候

I'm new to MySql and also connecting MySql from visual Studio.Please help me in this, How to connect to MySql from Visual Studio and How to call mysql stored procedure with parameters in c#.net.
Thanks & Regards

推荐答案

参考这个 -

http://docs.oracle.com/cd/E17952_01/refman-5.6-en/connector-net-tutorials-intro.html [ ^ ]
refer this-
http://docs.oracle.com/cd/E17952_01/refman-5.6-en/connector-net-tutorials-intro.html[^]


去看看(该网站上有更多内容......)。

http://dev.mysql.com/doc/refman/5.0/en/connector-net-programming- stored.html [ ^ ]
Go and read this (there is more on that site...).
http://dev.mysql.com/doc/refman/5.0/en/connector-net-programming-stored.html[^]


sqlcommand cmd =new sqlCommand("YourProcudereName","Your ConnectionString");
Cmd.CommandType=CommandType.StoresProcedure/if u r using StoredProdecure
cmd.paramaters.addwithvalue("@xyz",demo);


这篇关于如何用c#.net中的参数调用mysql存储过程?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆