如何在WPF中使用Sql Server创建存储过程 [英] How To create a Stored Procedure using Sql Server in WPF
本文介绍了如何在WPF中使用Sql Server创建存储过程的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
Coders。
我是C#的新手,请你解释一下C#中的存储过程是什么,请解释我如何在C#中创建和检索存储过程,>
问候,
Binayram.R
Hi, Coders.
I Am new to C#, Can you please explain me what is Stored Procedure in C#, please explain me How can we create and retrieve stored procedures in C#,
Regards,
Binayram.R
推荐答案
这是一个收集文章,告诉您存储过程是什么。 [ ^ ]
这是如何从C#调用存储过程 [ ^ ]
Here are a Collection of articles that tell you what a stored procedure is.[^]
Here is how you can call a stored procedure from C#[^]
抱歉,但你的问题毫无意义。
存储过程(SP)与C#无关,反之亦然。 存储过程 [ ^ ]类似于其他编程语言中的过程,但它在SQL Server端执行。你不能用C#编写SP。 SP使用 SQL结构化查询语言编写[ ^ ],即使您在代码中创建命令(查询)。
To创建SP,您需要运行 MS SQL Management Studio [ ^ ]。
创建存储过程 [ ^ ]
修改存储过程 [ ^ ]
创建SP后,您可以在C#代码中使用它:
如何:创建并执行返回行的SQL语句 [< a href =http://msdn.microsoft.com/en-us/library/fksx3b4f.aspxtarget =_ blanktitle =New Window> ^ ]
如何:创建并执行返回单个值的SQL语句 [ ^ ]
如何:创建并执行一个不返回值的SQL语句 [ ^ ]
Sorry, but your question makes no sense.
Stored procedure (SP) is not not related with C# and vice versa. Stored procedure[^] is similar to the procedure in other programming languages, but it's executed on SQL Server side. You can't write SP in C#. SP is written in SQL - Structured Query Language[^], even if you create command (query) in code.
To create SP, you need to run MS SQL Management Studio[^].
Create a Stored Procedure[^]
Modify a Stored Procedure[^]
After SP creation, you are able to use it in C# code:
How to: Create and Execute an SQL Statement that Returns Rows[^]
How to: Create and Execute an SQL Statement that Returns a Single Value[^]
How to: Create and Execute an SQL Statement that Returns No Value[^]
这篇关于如何在WPF中使用Sql Server创建存储过程的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文