Click here to Skip to main content
16,005,734 members
Home / Discussions / C#
   

C#

 
Generalmail accounts Pin
sianatia31-May-05 21:11
sianatia31-May-05 21:11 
Questionsplitting up a string? Pin
livez31-May-05 21:01
livez31-May-05 21:01 
AnswerRe: splitting up a string? Pin
Christian Graus31-May-05 21:19
protectorChristian Graus31-May-05 21:19 
GeneralStored Procedures Pin
NormBohana31-May-05 18:46
NormBohana31-May-05 18:46 
GeneralRe: Stored Procedures Pin
Christian Graus31-May-05 21:22
protectorChristian Graus31-May-05 21:22 
GeneralRe: Stored Procedures Pin
NormBohana1-Jun-05 13:53
NormBohana1-Jun-05 13:53 
GeneralRe: Stored Procedures Pin
Christian Graus1-Jun-05 13:56
protectorChristian Graus1-Jun-05 13:56 
GeneralRe: Stored Procedures Pin
NormBohana2-Jun-05 19:14
NormBohana2-Jun-05 19:14 
Christian, I can run the stored procedure in the sql analyzer, and its runs. I have since found out that my code was wrong. I have rewritten the code and here it is. I cannot find an example of what to in the datareader. Cannot you direct me to some doc. that I can use, it would help. I have purched Microsoft ADO.net its close but no example on how to use a insert stored procedure. Thanks

Norm Sniff | :^)


try
{

sqlUpdateCommand1.Connection = sqlConnection1;
if (sqlConnection1.State != ConnectionState.Open)
{
sqlConnection1.Open();
}

SqlCommand cmd = new SqlCommand("InsertCommandService");
cmd.CommandType = CommandType.StoredProcedure;

SqlParameterCollection pc = cmd.Parameters;

pc.Add("[@service-code]",SqlDbType.Int, 4);
pc.parameters[0].value = txtServiceCode.Text;
pc.Add("[@service-description]",SqlDbType.Char, 30);
pc.parameters[1].value = txtServiceDesc.Text;
pc.Add("[@large-animal-cost]",SqlDbType.Money, 8);
pc.parameters[2].value = cbLargeAnimalCost.Text;
pc.Add("[@medium-animal-cost]",SqlDbType.Money, 8);
pc.parameters[3].value = cbMediumAnimalCost.Text;
pc.Add("[@small-animal-cost]",SqlDbType.Money, 8);
pc.parameters[4].value = cbSmallAnimalCost.Text;

SqlDataReader rdr = pc.ExecuteReader();
if (rdr.Read())
{

}

this.Close();

GeneralRe: Stored Procedures Pin
Christian Graus5-Jun-05 10:46
protectorChristian Graus5-Jun-05 10:46 
GeneralTracking time of user in AD Pin
shaima'31-May-05 18:46
shaima'31-May-05 18:46 
GeneralHandle string Pin
rockxuyenmandem31-May-05 17:49
rockxuyenmandem31-May-05 17:49 
GeneralRe: Handle string Pin
MoustafaS31-May-05 20:08
MoustafaS31-May-05 20:08 
GeneralRe: Handle string Pin
Carsten Zeumer31-May-05 21:04
Carsten Zeumer31-May-05 21:04 
GeneralActiveX Autocad Pin
Newbie_Toy31-May-05 17:29
Newbie_Toy31-May-05 17:29 
GeneralRe: ActiveX Autocad Pin
Christian Graus31-May-05 17:38
protectorChristian Graus31-May-05 17:38 
GeneralRe: ActiveX Autocad Pin
Newbie_Toy31-May-05 19:11
Newbie_Toy31-May-05 19:11 
GeneralRe: ActiveX Autocad Pin
Christian Graus31-May-05 21:46
protectorChristian Graus31-May-05 21:46 
GeneralRe: ActiveX Autocad Pin
Reanalyse31-May-05 22:09
Reanalyse31-May-05 22:09 
GeneralRe: ActiveX Autocad Pin
Joel Lucsy2-Jun-05 15:34
Joel Lucsy2-Jun-05 15:34 
GeneralRe: ActiveX Autocad Pin
Newbie_Toy2-Jun-05 16:45
Newbie_Toy2-Jun-05 16:45 
GeneralRe: ActiveX Autocad Pin
Joel Lucsy3-Jun-05 2:37
Joel Lucsy3-Jun-05 2:37 
GeneralRe: ActiveX Autocad Pin
Newbie_Toy3-Jun-05 17:17
Newbie_Toy3-Jun-05 17:17 
GeneralRe: ActiveX Autocad Pin
Joel Lucsy6-Jun-05 3:42
Joel Lucsy6-Jun-05 3:42 
GeneralWindowsLocation and Mouse CoOrds. Pin
Akrynite31-May-05 16:01
Akrynite31-May-05 16:01 
GeneralRe: WindowsLocation and Mouse CoOrds. Pin
Christian Graus31-May-05 16:23
protectorChristian Graus31-May-05 16:23 

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.