Click here to Skip to main content
15,890,557 members
Home / Discussions / C#
   

C#

 
GeneralRe: Stupid WinForms Pin
Maqsood Ahmed5-Jun-05 22:16
Maqsood Ahmed5-Jun-05 22:16 
GeneralRe: Stupid WinForms Pin
Christian Graus6-Jun-05 12:20
protectorChristian Graus6-Jun-05 12:20 
GeneralRe: Stupid WinForms Pin
S. Senthil Kumar6-Jun-05 0:42
S. Senthil Kumar6-Jun-05 0:42 
GeneralRe: Stupid WinForms Pin
Christian Graus6-Jun-05 12:21
protectorChristian Graus6-Jun-05 12:21 
Generalsql stored preocedure Pin
Mohammad Daba'an5-Jun-05 20:08
Mohammad Daba'an5-Jun-05 20:08 
GeneralRe: sql stored preocedure Pin
Colin Angus Mackay5-Jun-05 20:51
Colin Angus Mackay5-Jun-05 20:51 
GeneralRe: sql stored preocedure Pin
Mohammad Daba'an5-Jun-05 22:51
Mohammad Daba'an5-Jun-05 22:51 
GeneralRe: sql stored preocedure Pin
Colin Angus Mackay6-Jun-05 0:28
Colin Angus Mackay6-Jun-05 0:28 
Really, you should be creating stored procedures in advance of running your application - unless it is some sort of installation applicataion.

You are not going to get any data out of this in a C# application because there are no SELECT statements that return data out of the stored procedure. The only time you get print statements back is if an error occurs and the contents of any print statements is captured in the SqlException.

Anyway, to run a stored procedure this is the code you need in C#
SqlCommand cmd = new SqlCommand("Showhierarchy", myConnection);
cmd.CommandType = CommandType.StoredProcedure;
cmd.Parameters.Add("@index", indexValue);
cmd.ExecuteReader();
// or cmd.ExecuteNonQuery()
// if you don't expect any results back



My: Blog | Photos
WDevs.com - Open Source Code Hosting, Blogs, FTP, Mail and More


GeneralRe: sql stored preocedure Pin
Mohammad Daba'an6-Jun-05 0:44
Mohammad Daba'an6-Jun-05 0:44 
GeneralFriend Assembly Help needed... Pin
chettu5-Jun-05 19:15
chettu5-Jun-05 19:15 
GeneralRe: Friend Assembly Help needed... Pin
oykica6-Jun-05 6:57
oykica6-Jun-05 6:57 
GeneralRe: Friend Assembly Help needed... Pin
pavel.drtil26-May-10 1:18
pavel.drtil26-May-10 1:18 
GeneralMy own little lexer/parser (trouble even getting started) Pin
Insolence5-Jun-05 18:50
Insolence5-Jun-05 18:50 
QuestionHow to save Images in Mysql DataBase Through C# Pin
monica2k5-Jun-05 18:37
monica2k5-Jun-05 18:37 
AnswerRe: How to save Images in Mysql DataBase Through C# Pin
Christian Graus5-Jun-05 18:39
protectorChristian Graus5-Jun-05 18:39 
GeneralRe: How to save Images in Mysql DataBase Through C# Pin
monica2k5-Jun-05 19:07
monica2k5-Jun-05 19:07 
AnswerRe: How to save Images in Mysql DataBase Through C# Pin
pubududilena5-Jun-05 22:35
pubududilena5-Jun-05 22:35 
GeneralRe: How to save Images in Mysql DataBase Through C# Pin
monica2k6-Jun-05 13:57
monica2k6-Jun-05 13:57 
QuestionCustom Repeater or something else? Pin
methodincharge5-Jun-05 16:52
methodincharge5-Jun-05 16:52 
AnswerRe: Custom Repeater or something else? Pin
Christian Graus5-Jun-05 16:54
protectorChristian Graus5-Jun-05 16:54 
GeneralRe: Custom Repeater or something else? Pin
methodincharge5-Jun-05 17:12
methodincharge5-Jun-05 17:12 
GeneralRe: Custom Repeater or something else? Pin
Christian Graus5-Jun-05 17:17
protectorChristian Graus5-Jun-05 17:17 
GeneralDisplay Application Names from Active Directory Group Policy Management Console using vb.net or C#.net Pin
Member 16715325-Jun-05 16:04
Member 16715325-Jun-05 16:04 
GeneralExecuting Another Application From a C# Program Pin
vylkier5-Jun-05 15:47
vylkier5-Jun-05 15:47 
GeneralRe: Executing Another Application From a C# Program Pin
Christian Graus5-Jun-05 15:52
protectorChristian Graus5-Jun-05 15:52 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.