Asp .net中的存储过程c# [英] Stored Procedure in Asp .net c#

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

问题描述

我对存储过程更新,请帮我一个忙我有一个表中有两行的数据现在我需要将特定的列值重新检入文本框我已经写了我的代码在sp中得到了我需要的检索到文本框请帮助我..我的代码已经测试了...





HI am newer to stored procedure kindly pls do me a favour i have an data with two rows in an table now i need to retrive the specific column value into textbox i have writen my code in sp n got op nw i need to retrive that to text box pls help me..here is my code i have tested...


cmd = new SqlCommand("faults", con);
       cmd.CommandType = CommandType.StoredProcedure;
 cmd.Parameters.Add(new SqlParameter("@TextBox1", System.Data.SqlDbType.Int));
         dr = cmd.ExecuteReader();
       while (dr.Read())
       {
           TextBox1.Text = dr[0].ToString();
           TextBox2.Text = dr[1].ToString();


       }
       dr.Dispose();
       cmd.Dispose();




My error 
Procedure faults has no parameters and arguments were supplied.





请帮帮我



谢谢......



Help me pls

Thank You...

推荐答案

在进入解决方案之前,你肯定需要了解参数解析这可能会对你有所帮助



https://www.google.co.in/search?q=Stored+Procedure+in+Asp+.net+c%23&oq=Stored+Procedure+in+Asp+.net+ c%23& aqs = chrome.0.69i57& sourceid = chrome& ie = UTF-8 [ ^ ]



首先了解这一点你肯定会找到解决方案你的自我



问候......:)
before going into solution you definately need to learn about parameter parsing this may help you

https://www.google.co.in/search?q=Stored+Procedure+in+Asp+.net+c%23&oq=Stored+Procedure+in+Asp+.net+c%23&aqs=chrome.0.69i57&sourceid=chrome&ie=UTF-8[^]

first learn this you will definitely find solution your self

regards...:)






你发布了你的错误

Hi,

You posted your error
My error
Procedure faults has no parameters and arguments were supplied.





此错误表示您的程序出错没有任何参数。

请检查你的sp。



This error indicate that your procedure "faults" does not have any parameter.
Please check your sp.


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

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