Click here to Skip to main content
15,907,329 members
Home / Discussions / C#
   

C#

 
AnswerRe: Conversion of varchar datatype to a datetime resultant in an out renge value- Sql Server 2008 - Update Pin
PIEBALDconsult7-Jul-11 2:58
mvePIEBALDconsult7-Jul-11 2:58 
AnswerRe: Conversion of varchar datatype to a datetime resultant in an out renge value- Sql Server 2008 - Update Pin
#realJSOP7-Jul-11 3:08
professional#realJSOP7-Jul-11 3:08 
QuestionHow to create list of ALL file associations(friendly application names & executables) for file type Pin
JViljoen6-Jul-11 23:20
JViljoen6-Jul-11 23:20 
AnswerRe: How to create list of ALL file associations(friendly application names & executables) for file type Pin
Mario Majčica7-Jul-11 10:42
professionalMario Majčica7-Jul-11 10:42 
QuestionWindows Explorer like thumbnail selection in a list view Pin
9ine6-Jul-11 21:48
9ine6-Jul-11 21:48 
AnswerRe: Windows Explorer like thumbnail selection in a list view Pin
lukeer7-Jul-11 2:06
lukeer7-Jul-11 2:06 
AnswerRe: Windows Explorer like thumbnail selection in a list view Pin
9ine7-Jul-11 6:06
9ine7-Jul-11 6:06 
GeneralRe: Windows Explorer like thumbnail selection in a list view Pin
lukeer8-Jul-11 0:22
lukeer8-Jul-11 0:22 
QuestionFrom DataTable to multi-Line Chart Pin
Rminator6-Jul-11 20:49
Rminator6-Jul-11 20:49 
AnswerRe: From DataTable to multi-Line Chart Pin
BobJanova6-Jul-11 22:34
BobJanova6-Jul-11 22:34 
GeneralRe: From DataTable to multi-Line Chart Pin
Rminator6-Jul-11 22:39
Rminator6-Jul-11 22:39 
GeneralRe: From DataTable to multi-Line Chart Pin
BobJanova7-Jul-11 4:31
BobJanova7-Jul-11 4:31 
GeneralRe: From DataTable to multi-Line Chart Pin
Rminator7-Jul-11 4:59
Rminator7-Jul-11 4:59 
GeneralRe: From DataTable to multi-Line Chart Pin
Rminator14-Jul-11 20:26
Rminator14-Jul-11 20:26 
QuestionWindows Name Pin
M Riaz Bashir6-Jul-11 19:47
M Riaz Bashir6-Jul-11 19:47 
AnswerRe: Windows Name PinPopular
Wayne Gaylard6-Jul-11 20:42
professionalWayne Gaylard6-Jul-11 20:42 
GeneralRe: Windows Name Pin
M Riaz Bashir6-Jul-11 20:43
M Riaz Bashir6-Jul-11 20:43 
QuestionWhy is the Insert done once while there are 13 Records Pin
Vimalsoft(Pty) Ltd6-Jul-11 8:20
professionalVimalsoft(Pty) Ltd6-Jul-11 8:20 
AnswerRe: Why is the Insert done once while there are 13 Records Pin
#realJSOP6-Jul-11 8:44
professional#realJSOP6-Jul-11 8:44 
GeneralRe: Why is the Insert done once while there are 13 Records Pin
Vimalsoft(Pty) Ltd6-Jul-11 9:14
professionalVimalsoft(Pty) Ltd6-Jul-11 9:14 
AnswerRe: Why is the Insert done once while there are 13 Records Pin
GenJerDan6-Jul-11 9:19
GenJerDan6-Jul-11 9:19 
GeneralRe: Why is the Insert done once while there are 13 Records Pin
Vimalsoft(Pty) Ltd6-Jul-11 9:41
professionalVimalsoft(Pty) Ltd6-Jul-11 9:41 
i have change it to look like this

foreach (EcashProductCatModel ecash in model)
{
 using (var cmdinsert = new SqlCommand("sp_AddProductCategory", con))
 {
  cmdinsert.CommandType = CommandType.StoredProcedure;

  cmdinsert.Parameters.Add("@CATEGORY_ID", SqlDbType.Int).Value = ecash.CATEGORY_ID;
  cmdinsert.Parameters.Add("@CATEGORY_DESCRIPTION", SqlDbType.VarChar).Value =
   ecash.CATEGORY_DESCRIPTION;
  cmdinsert.Parameters.Add("@SCHOOLID", SqlDbType.Int).Value = ecash.SCHOOLID;
  cmdinsert.ExecuteNonQuery();
 }

}


and its working perfectly

Thanks
Vuyiswa Maseko,

Spoted in Daniweb-- Sorry to rant. I hate websites. They are just wierd. They don't behave like normal code.

C#/VB.NET/ASP.NET/SQL7/2000/2005/2008
http://www.vuyiswamaseko.com
vuyiswa@its.co.za
http://www.itsabacus.co.za/itsabacus/

AnswerRe: Why is the Insert done once while there are 13 Records Pin
PIEBALDconsult6-Jul-11 14:19
mvePIEBALDconsult6-Jul-11 14:19 
Questionhow to display the output from LM35 on pc in C# Pin
aeman6-Jul-11 4:47
aeman6-Jul-11 4:47 
AnswerRe: how to display the output from LM35 on pc in C# Pin
Alan N6-Jul-11 7:33
Alan N6-Jul-11 7:33 

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.