{"id":4674,"date":"2012-04-08T16:27:33","date_gmt":"2012-04-08T11:57:33","guid":{"rendered":"http:\/\/blog.iranhostdir.ir\/?p=4674"},"modified":"2025-04-29T19:19:14","modified_gmt":"2025-04-29T15:49:14","slug":"%d8%b1%d9%88%db%8c%d9%87-%d9%87%d8%a7%db%8c-%d8%b0%d8%ae%db%8c%d8%b1%d9%87-%d8%b4%d8%af%d9%87","status":"publish","type":"post","link":"https:\/\/iranhost.com\/blog\/%d8%b1%d9%88%db%8c%d9%87-%d9%87%d8%a7%db%8c-%d8%b0%d8%ae%db%8c%d8%b1%d9%87-%d8%b4%d8%af%d9%87\/","title":{"rendered":"stored procedure \u06cc\u0627 sp \u0686\u06cc\u0633\u062a + \u0645\u0639\u0631\u0641\u06cc \u06f8 \u0642\u0627\u0628\u0644\u06cc\u062a \u0627\u0633\u062a\u0648\u0631 \u067e\u0631\u0648\u0633\u06cc\u062c\u0631"},"content":{"rendered":"<p dir=\"RTL\">\u062f\u0631 \u0627\u06cc\u0646 \u0645\u0642\u0627\u0644\u0647 \u062f\u0631 \u0645\u0648\u0631\u062f Stored Procedure \u06cc\u0627 \u0627\u0633\u062a\u0648\u0631 \u067e\u0631\u0648\u0633\u06cc\u062c\u0631 \u06a9\u0647 \u0628\u0647 \u0635\u0648\u0631\u062a \u0645\u062e\u0641\u0641 \u0628\u0647 \u0622\u0646 SP \u0645\u06cc \u06af\u0648\u06cc\u06cc\u0645 \u0648 \u067e\u0627\u0631\u0627\u0645\u062a\u0631 \u0647\u0627 \u0648 \u0642\u0627\u0628\u0644\u06cc\u062a \u0647\u0627\u06cc \u0622\u0646 \u062f\u0631 sql server\u00a0 \u0648 Asp.Net \u0635\u062d\u0628\u062a \u0645\u06cc \u06a9\u0646\u06cc\u0645.<\/p>\n<h2 dir=\"RTL\">stored procedure \u0686\u06cc\u0633\u062a\u061f<\/h2>\n<p dir=\"RTL\" style=\"text-align: justify;\">sp \u0686\u06cc\u0633\u062a\u061f \u0627\u0633\u062a\u0648\u0631 \u067e\u0631\u0648\u0633\u06cc\u062c\u0631 Stored Procedure\u060c \u06cc\u0627 \u0628\u0647 \u0632\u0628\u0627\u0646 \u0641\u0627\u0631\u0633\u06cc &#8220;\u0631\u0648\u06cc\u0647 \u0647\u0627\u06cc \u0630\u062e\u06cc\u0631\u0647 \u0634\u062f\u0647&#8221; \u0627\u0634\u06cc\u0627\u06cc\u06cc \u0627\u062c\u0631\u0627 \u067e\u0630\u06cc\u0631 \u062f\u0631 \u0628\u0627\u0646\u06a9 \u0627\u0637\u0644\u0627\u0639\u0627\u062a\u06cc SQL Server \u0647\u0633\u062a\u0646\u062f \u06a9\u0647 \u0634\u0627\u0645\u0644 \u06cc\u06a9 \u06cc\u0627 \u0686\u0646\u062f\u06cc\u0646 \u062f\u0633\u062a\u0648\u0631 SQL \u0645\u06cc \u0634\u0648\u0646\u062f. \u0627\u06cc\u0646 \u0631\u0648\u06cc\u0647 \u0647\u0627 \u0645\u06cc\u062a\u0648\u0627\u0646\u0646\u062f \u067e\u0627\u0631\u0627\u0645\u062a\u0631 \u0647\u0627\u06cc \u0648\u0631\u0648\u062f\u06cc \u0648 \u062e\u0631\u0648\u062c\u06cc \u062f\u0627\u0634\u062a\u0647 \u0628\u0627\u0634\u0646\u062f. \u0647\u0645\u0686\u0646\u06cc\u0646 \u0645\u06cc\u062a\u0648\u0627\u0646 \u062f\u0627\u062e\u0644 \u0627\u06cc\u0646 \u0631\u0648\u06cc\u0647 \u0647\u0627 \u0628\u0647 \u0632\u0628\u0627\u0646 SQL \u0628\u0631\u0646\u0627\u0645\u0647 \u0646\u0648\u06cc\u0633\u06cc \u06a9\u0631\u062f.<\/p>\n<p dir=\"RTL\" style=\"text-align: justify;\">\u0645\u0647\u0645 \u062a\u0631\u06cc\u0646 \u06a9\u0627\u0631\u0628\u0631\u062f \u0627\u06cc\u0646 \u0631\u0648\u06cc\u0647 \u0647\u0627 \u0630\u062e\u06cc\u0631\u0647 \u06a9\u0631\u062f\u0646 \u062f\u0633\u062a\u0648\u0631\u0627\u062a Select \u060cInsert \u060cUpdate \u060cDelete \u06cc\u0627 \u062a\u0631\u06a9\u06cc\u0628\u06cc \u0627\u0632 \u0627\u06cc\u0646\u0647\u0627 \u0627\u0633\u062a. \u0632\u0645\u0627\u0646\u06cc \u06a9\u0647 \u0627\u0632 stored procedure \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u0634\u0648\u062f\u060c \u0627\u06cc\u0646 \u0631\u0648\u06cc\u0647 \u062f\u0631 \u062d\u0627\u0641\u0638\u0647 \u0630\u062e\u06cc\u0631\u0647 \u0634\u062f\u0647 \u0648 \u0628\u0631\u0627\u06cc \u0641\u0631\u0627\u062e\u0648\u0627\u0646\u06cc \u0645\u062c\u062f\u062f \u0646\u06cc\u0627\u0632 \u0628\u0647 \u0635\u0631\u0641 \u0632\u0645\u0627\u0646 \u0627\u0648\u0644\u06cc\u0647 \u0646\u06cc\u0633\u062a \u0648 \u06a9\u0648\u0626\u0631\u06cc \u062f\u0631 \u062e\u0648\u0627\u0633\u062a\u06cc \u0628\u0627 \u0633\u0631\u0639\u062a \u0628\u0627\u0644\u0627\u06cc\u06cc \u0628\u0647 \u0646\u0633\u0628\u062a \u0642\u0628\u0644 \u0627\u062c\u0631\u0627 \u0645\u06cc \u0634\u0648\u062f.<\/p>\n<h2 dir=\"RTL\" style=\"text-align: justify;\">\u0642\u0627\u0628\u0644\u06cc\u062a \u0647\u0627 \u0648 \u0645\u0632\u0627\u06cc\u0627\u06cc Stored Procedure<\/h2>\n<ol style=\"text-align: justify;\" start=\"1\">\n<li>Precompiled \u0628\u0648\u062f\u0646 \u0622\u0646\u0647\u0627 \u0628\u0647 \u0627\u06cc\u0646 \u0645\u0639\u0646\u06cc \u06a9\u0647 \u0628\u0647 \u0632\u0628\u0627\u0646 \u0645\u0627\u0634\u06cc\u0646 \u0628\u0633\u06cc\u0627\u0631 \u0646\u0632\u062f\u06cc\u06a9 \u0634\u062f\u0647 \u0648 \u0628\u0647 \u0637\u0648\u0631 \u06a9\u0627\u0645\u0644 \u0627\u0632 \u0627\u0648\u0644 \u062a\u0631\u062c\u0645\u0647 \u0646\u0645\u06cc\u0634\u0648\u062f\u060c \u0627\u06cc\u0646 \u0627\u0645\u0631 \u0628\u0627\u0639\u062b \u0627\u0641\u0632\u0627\u06cc\u0634 \u0633\u0631\u0639\u062a \u0628\u0627\u0631\u06af\u0632\u0627\u0631\u06cc \u0645\u06cc \u06af\u0631\u062f\u062f.<\/li>\n<li>\u0642\u0627\u0628\u0644\u06cc\u062a \u0630\u062e\u06cc\u0631\u0647 \u062f\u0627\u0634\u062a\u0647 \u0648 \u0645\u06cc\u062a\u0648\u0627\u0646 \u0627\u0632 \u06cc\u06a9 \u0631\u0648\u06cc\u0647 \u0686\u0646\u062f\u06cc\u0646 \u0628\u0627\u0631 \u062f\u0631 \u06a9\u062f \u0646\u0648\u06cc\u0633\u06cc \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u06a9\u0631\u062f.<\/li>\n<li>\u062f\u0627\u0631\u0627\u06cc \u0648\u06cc\u0631\u0627\u06cc\u0634\u06af\u0631 Query \u0645\u06cc \u0628\u0627\u0634\u062f (\u0645\u06cc\u062a\u0648\u0627\u0646\u06cc\u062f \u0628\u0647 \u0633\u0627\u062f\u06af\u06cc \u06cc\u06a9 Query \u062d\u0631\u0641\u0647 \u0627\u06cc \u0627\u06cc\u062c\u0627\u062f \u06a9\u0646\u06cc\u062f).<\/li>\n<li>\u062f\u0627\u0631\u0627\u06cc Syntax Parser \u0647\u0633\u062a \u0648 \u0627\u0632 \u062e\u0637\u0627\u0647\u0627\u06cc SQL \u062c\u0644\u0648\u06af\u06cc\u0631\u06cc \u0645\u06cc \u06a9\u0646\u062f.<\/li>\n<li>\u062f\u0627\u0631\u0627\u06cc \u0627\u0645\u0646\u06cc\u062a \u0628\u0627\u0644\u0627\u06cc\u06cc \u0627\u0633\u062a \u0648 \u0627\u0632 \u0647\u06a9 \u0634\u062f\u0646 \u0633\u0627\u06cc\u062a \u0634\u0645\u0627 \u062a\u0648\u0633\u0637 SQL Injection \u062f\u0631 \u0628\u0633\u06cc\u0627\u0631\u06cc \u0645\u0648\u0627\u0631\u062f \u062c\u0644\u0648\u06af\u06cc\u0631\u06cc \u0645\u06cc \u06a9\u0646\u062f.<\/li>\n<li>\u0642\u0627\u0628\u0644\u06cc\u062a \u062f\u0631\u062c \u0686\u0646\u062f\u06cc\u0646 \u062f\u0633\u062a\u0648\u0631 SQL \u0631\u0627 \u067e\u0634\u062a \u0633\u0631\u0647\u0645 \u062f\u0627\u0631\u0627\u0633\u062a.<\/li>\n<li>\u0642\u0627\u0628\u0644\u06cc\u062a \u0627\u0631\u0633\u0627\u0644 \u0648\u0631\u0648\u062f\u06cc \u0648 \u062e\u0631\u0648\u062c\u06cc \u062f\u0627\u0631\u062f.<\/li>\n<li>\u0642\u0627\u0628\u0644\u06cc\u062a \u0628\u0631\u0646\u0627\u0645\u0647 \u0646\u0648\u06cc\u0633\u06cc ( \u0634\u0631\u0637\u060c \u062d\u0644\u0642\u0647 \u0648 . . .) \u0628\u0647 \u0632\u0628\u0627\u0646 TransactSQL \u062f\u0627\u0631\u062f.<\/li>\n<\/ol>\n<h2 dir=\"RTL\" style=\"text-align: justify;\"><img decoding=\"async\" class=\"aligncenter wp-image-32937\" src=\"https:\/\/iranhost.com\/blog\/wp-content\/uploads\/2012\/04\/MySQL-Stored-Procedures.jpg\" alt=\"\u00a0\u0642\u0627\u0628\u0644\u06cc\u062a \u0647\u0627\u06cc Stored Procedure \u067e\u0631\u0648\u0633\u06cc\u062c\u0631 \u0686\u06cc\u0633\u062a \u061f\" width=\"600\" height=\"248\" srcset=\"https:\/\/iranhost.com\/blog\/wp-content\/uploads\/2012\/04\/MySQL-Stored-Procedures.jpg 698w, https:\/\/iranhost.com\/blog\/wp-content\/uploads\/2012\/04\/MySQL-Stored-Procedures-300x124.jpg 300w\" sizes=\"(max-width: 600px) 100vw, 600px\" \/><\/h2>\n<h2 dir=\"RTL\" style=\"text-align: justify;\">\u0646\u062d\u0648\u0647 \u0633\u0627\u062e\u062a stored procedure \u062f\u0631 sql server<\/h2>\n<p dir=\"RTL\" style=\"text-align: justify;\">-\u0648\u0627\u0631\u062f \u0628\u0627\u0646\u06a9 \u0627\u0637\u0644\u0627\u0639\u0627\u062a\u06cc SQL Server \u0634\u062f\u0647\u060c \u067e\u0633 \u0627\u0632 \u0628\u0627\u0632 \u06a9\u0631\u062f\u0646 \u0628\u0627\u0646\u06a9 \u0645\u0648\u0631\u062f \u0646\u0638\u0631 \u062f\u0631 \u0642\u0633\u0645\u062a Programmability \u0648\u0627\u0631\u062f \u0628\u062e\u0634 Stored Procedure \u0634\u0648\u06cc\u062f.<\/p>\n<p dir=\"RTL\" style=\"text-align: justify;\">-\u0628\u0631 \u0631\u0648\u06ccStored Procedure\u00a0 \u06a9\u0644\u06cc\u06a9 \u0631\u0627\u0633\u062a \u06a9\u0631\u062f\u0647 \u0648 New Stored Procedure \u0631\u0627 \u0627\u0646\u062a\u062e\u0627\u0628 \u0646\u0645\u0627\u06cc\u06cc\u062f.<\/p>\n<p dir=\"RTL\" style=\"text-align: justify;\">\u0627\u062d\u062a\u0645\u0627\u0644\u0627 \u06a9\u062f \u0647\u0627\u06cc \u067e\u06cc\u0634\u0641\u0631\u0636\u06cc \u0631\u0627 \u062f\u0631 \u0627\u06cc\u0646 \u0635\u0641\u062d\u0647 \u0645\u0634\u0627\u0647\u062f\u0647 \u0645\u06cc \u06a9\u0646\u06cc\u062f\u060c \u0647\u0645\u0647 \u0627\u06cc\u0646 \u06a9\u062f \u0647\u0627 \u0631\u0627 \u062d\u0630\u0641 \u06a9\u0631\u062f\u0647 \u0648 \u0628\u0647 \u0635\u0648\u0631\u062a \u0632\u06cc\u0631 \u06a9\u062f \u0646\u0648\u06cc\u0633\u06cc \u06a9\u0646\u06cc\u062f:<\/p>\n<pre dir=\"RTL\" style=\"text-align: left;\">Create Procedure YourProcedureName(@FirstParamete DataType,@SecondParameter DataType,...)\r\nAs\r\nBegin\r\nSQLStatement\r\nEnd<\/pre>\n<p dir=\"RTL\" style=\"text-align: justify;\">\u06a9\u062f \u0641\u0648\u0642 \u0634\u06a9\u0644 \u06a9\u0644\u06cc \u0633\u0627\u062e\u062a \u0631\u0648\u06cc\u0647 \u0647\u0627\u06cc \u0630\u062e\u06cc\u0631\u0647 \u0634\u062f\u0647 \u0645\u06cc \u0628\u0627\u0634\u062f.<\/p>\n<p dir=\"RTL\" style=\"text-align: justify;\">\u0628\u0647 \u062c\u0627\u06cc YourProcedureName \u06cc\u06a9 \u0646\u0627\u0645 \u0628\u0631\u0627\u06cc \u0628\u0631\u0627\u06cc \u0631\u0648\u06cc\u0647 \u0627\u0646\u062a\u062e\u0627\u0628 \u06a9\u0646\u06cc\u062f. \u0633\u0639\u06cc \u06a9\u0646\u06cc\u062f \u0646\u0627\u0645\u06cc \u06a9\u0647 \u0627\u0646\u062a\u062e\u0627\u0628 \u0645\u06cc \u0646\u0645\u0627\u06cc\u06cc\u062f \u0645\u0641\u0647\u0648\u0645 \u0631\u0648\u06cc\u0647 \u0634\u0645\u0627 \u0631\u0627 \u0628\u0631\u0633\u0627\u0646\u062f \u0628\u0647 \u0639\u0646\u0648\u0627\u0646 \u0645\u062b\u0627\u0644 \u0628\u0631\u0627\u06cc \u062f\u0631\u062c \u06cc\u06a9 \u0631\u06a9\u0648\u0631\u062f \u062c\u062f\u06cc\u062f \u062f\u0631 \u062c\u062f\u0648\u0644 Members \u0645\u06cc \u062a\u0648\u0627\u0646\u06cc\u062f \u0646\u0627\u0645 AddNewMember \u0631\u0627 \u0627\u0646\u062a\u062e\u0627\u0628 \u06a9\u0646\u06cc\u062f \u0648 \u06cc\u0627 \u0628\u0631\u0627\u06cc \u062f\u0631\u06cc\u0627\u0641\u062a \u062a\u0645\u0627\u0645 \u0631\u06a9\u0648\u0631\u062f \u0647\u0627\u06cc \u0627\u06cc\u0646 \u062c\u062f\u0648\u0644 \u0646\u0627\u0645 GetAllMembers \u0646\u0627\u0645 \u0628\u0627 \u0645\u0641\u0647\u0648\u0645\u06cc \u0627\u0633\u062a.<\/p>\n<p dir=\"RTL\" style=\"text-align: justify;\">\u062f\u0631 \u067e\u0631\u0627\u0646\u062a\u0632 \u0645\u0642\u0627\u0628\u0644 \u0646\u0627\u0645 \u0631\u0648\u06cc\u0647 \u067e\u0627\u0631\u0627\u0645\u062a\u0631 \u0647\u0627\u06cc \u0631\u0648\u06cc\u0647 \u0628\u0647 \u0647\u0645\u0631\u0627\u0647 \u0646\u0648\u0639 \u067e\u0627\u0631\u0627\u0645\u062a\u0631 \u062a\u0639\u06cc\u06cc\u0646 \u0645\u06cc \u0634\u0648\u062f\u060c \u0627\u06af\u0631 \u062a\u0639\u062f\u0627\u062f \u067e\u0627\u0631\u0627\u0645\u062a\u0631 \u0647\u0627 \u0628\u06cc\u0634\u062a\u0631 \u0627\u0632 \u06cc\u06a9\u06cc \u0628\u0648\u062f \u0628\u0627 \u0648\u06cc\u0631\u06af\u0648\u0644 \u0622\u0646\u0647\u0627 \u0631\u0627 \u062c\u062f\u0627 \u06a9\u0646\u06cc\u062f.<\/p>\n<p dir=\"RTL\" style=\"text-align: justify;\">\u0628\u0647 \u062c\u0627\u06cc SQLStatement \u00a0\u062f\u0633\u062a\u0648\u0631\u0627\u062a SQl \u00a0\u0631\u0627 \u06a9\u0647 \u0628\u06cc\u0646 Begin \u00a0\u00a0\u0648 End\u00a0 \u0646\u0648\u0634\u062a\u0647 \u0645\u06cc \u0634\u0648\u0646\u062f \u062a\u0627\u06cc\u067e \u06a9\u0646\u06cc\u062f.<\/p>\n<p dir=\"RTL\" style=\"text-align: justify;\">\u062f\u0633\u062a\u0648\u0631\u0627\u062a\u06cc \u0645\u0627\u0646\u0646\u062fSelect ,Insert ,Update ,Delete \u00a0\u00a0\u0648 . . .<\/p>\n<p dir=\"RTL\" style=\"text-align: justify;\">\u0628\u0647 \u0639\u0646\u0648\u0627\u0646 \u0645\u062b\u0627\u0644 SP \u0627\u0633\u062a\u0648\u0631 \u067e\u0631\u0648\u0633\u06cc\u062c\u0631 \u0632\u06cc\u0631 \u0627\u0637\u0644\u0627\u0639\u0627\u062a \u06a9\u0627\u0631\u0628\u0631 \u0631\u0627 \u0628\u0627 \u062f\u0631\u06cc\u0627\u0641\u062a \u067e\u0627\u0631\u0627\u0645\u062a\u0631 \u0646\u0627\u0645 \u06a9\u0627\u0631\u0628\u0631\u06cc ( ( @ID\u00a0 \u0627\u0632 \u062c\u062f\u0648\u0644 TBL_Members \u00a0\u062f\u0631\u06cc\u0627\u0641\u062a \u0645\u06cc \u06a9\u0646\u062f:<\/p>\n<pre dir=\"RTL\" style=\"text-align: left;\">create procedure GetMemberbyID(@ID nvarchar(100))\r\nas\r\nbegin\r\nselect * from TBL_Members where ID=@ID\r\nend<\/pre>\n<p dir=\"RTL\" style=\"text-align: justify;\">\u0633\u067e\u0633 \u0628\u0631 \u0631\u0648\u06cc \u062f\u06a9\u0645\u0647 Execute \u06a9\u0644\u06cc\u06a9 \u06a9\u0631\u062f\u0647 \u062a\u0627 \u0631\u0648\u06cc\u0647 \u0634\u0645\u0627 \u0633\u0627\u062e\u062a\u0647 \u0648 \u0630\u062e\u06cc\u0631\u0647 \u06af\u0631\u062f\u062f.<\/p>\n<p dir=\"RTL\">\n<div class=\"readmore\" style=\"text-align: justify;\">\u0628\u06cc\u0634\u062a\u0631 \u0628\u062e\u0648\u0627\u0646\u06cc\u062f: <a href=\"https:\/\/iranhost.com\/blog\/%D8%B1%D8%A7%D9%87%D9%86%D9%85%D8%A7%DB%8C-%D8%A7%D8%B3%D8%AA%D9%81%D8%A7%D8%AF%D9%87-%D8%A7%D8%B2-%DA%A9%D9%84%DB%8C%D8%AF%D9%87%D8%A7%DB%8C-%D9%85%DB%8C%D8%A7%D9%86%D8%A8%D8%B1-%D9%BE%D8%B1%DA%A9\/\">\u06a9\u0644\u06cc\u062f\u0647\u0627\u06cc \u0645\u06cc\u0627\u0646\u0628\u0631 sql server<\/a><\/div>\n<div><\/div>\n<p dir=\"RTL\">\n<h2 dir=\"RTL\">\u0646\u062d\u0648\u0647 \u0648\u06cc\u0631\u0627\u06cc\u0634 \u0631\u0648\u06cc\u0647 \u0647\u0627\u06cc \u0630\u062e\u06cc\u0631\u0647 \u0634\u062f\u0647 \u06cc\u0627 stored procedure<\/h2>\n<p dir=\"RTL\">\u0628\u0631\u0627\u06cc \u0627\u062f\u06cc\u062a \u0627\u0633\u062a\u0648\u0631 \u067e\u0631\u0648\u0633\u06cc\u062c\u0631 \u0645\u06cc \u062a\u0648\u0627\u0646\u06cc\u062f \u0627\u0632 Alter \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u06a9\u0646\u06cc\u062f:<\/p>\n<pre dir=\"RTL\" style=\"text-align: left;\">create procedure GetMemberbyID(@ID nvarchar(100))\r\nSET ANSI_NULLS ON \r\nGO\r\nSET QUOTED_IDENTIFIER ON\r\nGO\r\nALTER PROCEDURE GetEmployeeDetails\r\n      @EmployeeID int = 0\r\nAS\r\nBEGIN\r\n      SET NOCOUNT ON;\r\n      SELECT FirstName, LastName, BirthDate, City, Country\r\n      FROM Employees WHERE EmployeeID=@EmployeeID\r\nEND\r\nGO<\/pre>\n<h2 dir=\"RTL\">\u062f\u0633\u062a\u0648\u0631 drop \u062f\u0631 stored procedure<\/h2>\n<p>\u0628\u0631\u0627\u06cc drop \u0627\u0632 \u06a9\u062f \u0632\u06cc\u0631 \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u0645\u06cc \u06a9\u0646\u06cc\u0645:<\/p>\n<p style=\"text-align: left;\">DROP PROCEDURE GetEmployeeDetails<\/p>\n<h2 dir=\"RTL\">\u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u0627\u0632 \u0627\u0633\u062a\u0648\u0631 \u067e\u0631\u0648\u0633\u06cc\u062c\u0631 \u062f\u0631 Asp.Net<\/h2>\n<p dir=\"RTL\" style=\"text-align: justify;\">\u067e\u0633 \u0627\u0632 \u0622\u0634\u0646\u0627\u06cc\u06cc \u0628\u0627 \u0642\u0627\u0628\u0644\u06cc\u062a \u0647\u0627 \u0648 \u0646\u062d\u0648\u0647 \u0633\u0627\u062e\u062a Stored Procedure \u062f\u0631 \u0627\u06cc\u0646 \u0642\u0633\u0645\u062a \u0628\u0647 \u0646\u062d\u0648\u0647 \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u0627\u0632 \u0627\u06cc\u0646 \u0627\u0628\u0632\u0627\u0631 \u062c\u0627\u0644\u0628 \u062f\u0631 Asp.NET \u0645\u06cc \u067e\u0631\u062f\u0627\u0632\u06cc\u0645. \u0628\u0647 \u0634\u0645\u0627 \u067e\u06cc\u0634\u0646\u0647\u0627\u062f \u0645\u06cc \u0634\u0648\u062f \u0628\u0631\u0627\u06cc \u06a9\u0633\u0628 \u0627\u0637\u0644\u0627\u0639\u0627\u062a \u062f\u0631 \u062d\u0648\u0632\u0647 <a href=\"https:\/\/iranhost.com\/blog\/%D9%85%D8%B9%D8%B1%D9%81%DB%8C-asp-%D9%88-%DA%A9%D8%A7%D8%B1%D8%A8%D8%B1%D8%AF-%D8%A2%D9%86\/\">asp.net \u0686\u06cc\u0633\u062a<\/a> \u0645\u0642\u0627\u0644\u0647 \u062a\u062e\u0635\u0635\u06cc \u0645\u0627 \u0631\u0627 \u0645\u0637\u0627\u0644\u0639\u0647 \u0646\u0645\u0627\u06cc\u06cc\u062f.<\/p>\n<p dir=\"RTL\" style=\"text-align: justify;\">\u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u0627\u0632 \u0627\u06cc\u0646 \u0627\u0628\u0632\u0627\u0631 \u0628\u0633\u06cc\u0627\u0631 \u0633\u0627\u062f\u0647 \u0647\u0633\u062a. \u0627\u06af\u0631 \u0627\u0632 SQL Datasource \u06cc\u0627 Object Datasource \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u0645\u06cc \u06a9\u0646\u06cc\u062f \u06cc\u06a9 \u0648\u06cc\u0632\u0627\u0631\u062f \u0628\u0631\u0627\u06cc \u0633\u0627\u062e\u062a \u0648 \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u0627\u0632 Stored Procedure \u0647\u0627 \u0642\u0631\u0627\u0631 \u062f\u0627\u062f\u0647 \u0634\u062f\u0647 \u06a9\u0647 \u0628\u0647 \u0631\u0627\u062d\u062a\u06cc \u0622\u0646 \u0631\u0627 \u0645\u062f\u06cc\u0631\u06cc\u062a \u06a9\u0646\u06cc\u062f.<\/p>\n<p dir=\"RTL\" style=\"text-align: justify;\">\u0627\u06af\u0631 \u0627\u0632 \u06a9\u062f \u0646\u0648\u06cc\u0633\u06cc \u0628\u0631\u0627\u06cc \u06a9\u0627\u0631 \u0628\u0627 \u0628\u0627\u0646\u06a9 \u0647\u0627\u06cc \u0627\u0637\u0644\u0627\u0639\u0627\u062a\u06cc \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u0645\u06cc \u06a9\u0646\u06cc\u062f \u06a9\u0627\u0641\u06cc\u0633\u062a \u0628\u0639\u062f \u0627\u0632 \u062a\u0639\u0631\u06cc\u0641 SQLCommand \u0628\u0647 \u062c\u0627\u06cc \u062f\u0633\u062a\u0648\u0631\u0627\u062a SQL \u0646\u0627\u0645 SP \u0627\u0633\u062a\u0648\u0631 \u067e\u0631\u0648\u0633\u06cc\u062c\u0631 \u0631\u0627 \u0648\u0627\u0631\u062f \u0646\u0645\u0648\u062f\u0647 \u0648 \u0628\u0639\u062f \u0627\u0632 \u0622\u0646 \u06a9\u062f \u0632\u06cc\u0631 \u0631\u0627 \u0627\u0636\u0627\u0641\u0647 \u0646\u0645\u0627\u06cc\u06cc\u062f:<\/p>\n<p dir=\"RTL\" style=\"text-align: left;\" align=\"right\">Cmd.CommandType = CommandType.StoredProcedure;<\/p>\n<p dir=\"RTL\">\u0627\u06cc\u0646 \u06a9\u062f \u0628\u0647 \u0628\u0631\u0646\u0627\u0645\u0647 \u0645\u06cc \u06af\u0648\u06cc\u062f \u06a9\u0647 \u062f\u0633\u062a\u0648\u0631\u0627\u062a \u0646\u0648\u0634\u062a\u0647 \u0634\u062f\u0647 \u0627\u0632 \u0646\u0648\u0639 Stored Procedure \u0647\u0633\u062a\u0646\u062f \u0648 \u0646\u06cc\u0627\u0632\u06cc \u0628\u0647 \u062a\u0631\u062c\u0645\u0647 \u0622\u0646 \u0647\u0627 \u0646\u06cc\u0633\u062a.<\/p>\n<p dir=\"RTL\" style=\"text-align: right;\">\u062f\u0631 \u0646\u0647\u0627\u06cc\u062a \u06a9\u062f \u0647\u0627\u06cc \u0627\u062a\u0635\u0627\u0644 \u0645\u0627 \u0628\u0647 \u0634\u06a9\u0644 \u0632\u06cc\u0631 \u062e\u0648\u0627\u0647\u062f \u0628\u0648\u062f:<\/p>\n<pre dir=\"ltr\" style=\"text-align: left;\">SqlConnection Con=new SqlConnection(\"YourConnectionString\");\r\nSqlCommand Cmd = new SqlCommand(\"YourProcedureName\", Con);\r\nCmd.CommandType = CommandType.StoredProcedure;\r\nCon.Open();\r\n\/\/ Some Code...\r\nCon.Close();<\/pre>\n<p dir=\"RTL\" style=\"text-align: right;\">\u0628\u0631\u0627\u06cc \u0627\u0631\u0633\u0627\u0644 \u067e\u0627\u0631\u0627\u0645\u062a\u0631 \u0647\u0645 \u0628\u0647 \u0635\u0648\u0631\u062a \u0632\u06cc\u0631 \u0639\u0645\u0644 \u0645\u06cc \u06a9\u0646\u06cc\u0645:<\/p>\n<pre dir=\"ltr\" style=\"text-align: left;\">SqlConnection Con = new SqlConnection(\"YourConnectionString\");\r\nSqlCommand Cmd = new SqlCommand(\"YourProcedureName\", Con);\r\nCmd.CommandType = CommandType.StoredProcedure;\r\nCmd.Parameters.AddWithValue(\"@FirstParam\", Textbox1.Text);\r\nCmd.Parameters.AddWithValue(\"@SecondParam\", Textbox2.Text);\r\nCon.Open();\r\n\/\/ Some Code...\r\nCon.Close();<\/pre>\n<h2 dir=\"RTL\">\u0645\u0646\u0638\u0648\u0631 \u0627\u0632 \u067e\u0627\u0631\u0627\u0645\u062a\u0631\u0647\u0627\u06cc stored procedure \u0686\u06cc\u0633\u062a\u061f<\/h2>\n<p dir=\"RTL\" style=\"text-align: justify;\">Stored Procedure (\u0627\u0633\u062a\u0648\u0631 \u067e\u0631\u0648\u0633\u06cc\u062c\u0631) \u062f\u0627\u0631\u0627\u06cc \u062f\u0648 \u067e\u0627\u0631\u0627\u0645\u062a\u0631 \u0628\u0647 \u0646\u0627\u0645 FirstParam \u0648 SecondParam \u0627\u0633\u062a (\u0627\u0644\u0628\u062a\u0647 \u0634\u0645\u0627 \u0628\u0627\u06cc\u062f \u0628\u0647 \u0634\u06a9\u0644 \u0635\u062d\u06cc\u062d\u06cc \u067e\u0627\u0631\u0627\u0645\u062a\u0631 \u0647\u0627 \u0631\u0627 \u0646\u0627\u0645 \u06af\u0632\u0627\u0631\u06cc \u06a9\u0646\u06cc\u062f) \u0648 \u0627\u0632 \u0637\u0631\u06cc\u0642 \u0645\u062a\u062f AddWithValue \u00a0\u0645\u0642\u062f\u0627\u0631 \u062f\u0647\u06cc \u0634\u062f\u0647 \u0627\u0633\u062a.<\/p>\n<p><script type=\"application\/ld+json\">\n    {\n    \"@context\": \"http:\/\/schema.org\/\",\n    \"@type\": \"CreativeWorkSeason\",\n    \"name\": \"stored procedure \u06cc\u0627 sp \u0686\u06cc\u0633\u062a\",\n    \"aggregateRating\": {\n    \"@type\": \"AggregateRating\",\n    \"ratingValue\": \"5\",\n    \"reviewCount\": \"785\"\n    }\n}\n<\/script><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u062f\u0631 \u0627\u06cc\u0646 \u0645\u0642\u0627\u0644\u0647 \u062f\u0631 \u0645\u0648\u0631\u062f Stored Procedure \u06cc\u0627 \u0627\u0633\u062a\u0648\u0631 \u067e\u0631\u0648\u0633\u06cc\u062c\u0631 \u06a9\u0647 \u0628\u0647 \u0635\u0648\u0631\u062a \u0645\u062e\u0641\u0641 \u0628\u0647 \u0622\u0646 SP \u0645\u06cc \u06af\u0648\u06cc\u06cc\u0645 \u0648 \u067e\u0627\u0631\u0627\u0645\u062a\u0631 \u0647\u0627 \u0648 \u0642\u0627\u0628\u0644\u06cc\u062a \u0647\u0627\u06cc \u0622\u0646 \u062f\u0631 sql server\u00a0 \u0648 Asp.Net \u0635\u062d\u0628\u062a \u0645\u06cc \u06a9\u0646\u06cc\u0645. stored procedure \u0686\u06cc\u0633\u062a\u061f sp \u0686\u06cc\u0633\u062a\u061f \u0627\u0633\u062a\u0648\u0631 \u067e\u0631\u0648\u0633\u06cc\u062c\u0631 Stored Procedure\u060c \u06cc\u0627 \u0628\u0647 \u0632\u0628\u0627\u0646 \u0641\u0627\u0631\u0633\u06cc &#8220;\u0631\u0648\u06cc\u0647 \u0647\u0627\u06cc \u0630\u062e\u06cc\u0631\u0647 \u0634\u062f\u0647&#8221; \u0627\u0634\u06cc\u0627\u06cc\u06cc \u0627\u062c\u0631\u0627 \u067e\u0630\u06cc\u0631 \u062f\u0631 &hellip;<\/p>\n","protected":false},"author":64,"featured_media":35764,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[80],"tags":[],"class_list":["post-4674","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-80"],"_links":{"self":[{"href":"https:\/\/iranhost.com\/blog\/wp-json\/wp\/v2\/posts\/4674","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/iranhost.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/iranhost.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/iranhost.com\/blog\/wp-json\/wp\/v2\/users\/64"}],"replies":[{"embeddable":true,"href":"https:\/\/iranhost.com\/blog\/wp-json\/wp\/v2\/comments?post=4674"}],"version-history":[{"count":0,"href":"https:\/\/iranhost.com\/blog\/wp-json\/wp\/v2\/posts\/4674\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/iranhost.com\/blog\/wp-json\/wp\/v2\/media\/35764"}],"wp:attachment":[{"href":"https:\/\/iranhost.com\/blog\/wp-json\/wp\/v2\/media?parent=4674"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/iranhost.com\/blog\/wp-json\/wp\/v2\/categories?post=4674"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/iranhost.com\/blog\/wp-json\/wp\/v2\/tags?post=4674"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}