I checked this query over and over again and I cant tell what the problem is.

using (OleDbConnection connection = getConnection())
{
    string update = 
       "UPDATE Course SET SchoolID = @SchoolID, SchoolID2 = @SchoolID2, StatusID = @StatusID," +
       "Bannercode = @Bannercode, CourseName = @CourseName, Description = @Description, Credits = @Credits," +
       "Prereqs = @Prereqs, URL = @URL, Keywords = @Keywords, Email = @Email, Approved = @Approved, ApprovedBY = @ApprovedBY," +
       "ApprovedWhen = @ApprovedWhen, History = @History, Level = @Level WHERE ID = @ID";
    OleDbCommand command = new OleDbCommand(update,connection); 
    OleDbParameter pram1 = new OleDbParameter("@SchoolID", SchoolID);
    command.Parameters.Add(pram1); 
    OleDbParameter pram2 = new OleDbParameter("@SchoolID2", SchoolID2); 
    command.Parameters.Add(pram2);
    OleDbParameter pram3 = new OleDbParameter("@StatusID", StatusID);
    command.Parameters.Add(pram3); 
    OleDbParameter pram4 = new OleDbParameter("@Bannercode", Bannercode);
    command.Parameters.Add(pram4); 
    OleDbParameter pram5 = new OleDbParameter("@CourseName", CourseName); 
    command.Parameters.Add(pram5);
    OleDbParameter pram6 = new OleDbParameter("@Description", Description);
    command.Parameters.Add(pram6); 
    OleDbParameter pram7 = new OleDbParameter("@Credits", Credits);
    command.Parameters.Add(pram7); 
    OleDbParameter pram8= new OleDbParameter("@Prereqs", Prereqs); 
    command.Parameters.Add(pram8); 
    OleDbParameter pram9 = new OleDbParameter("@URL", URL); 
    command.Parameters.Add(pram9);
    OleDbParameter pram10 = new OleDbParameter("@Keywords", Keywords); 
    command.Parameters.Add(pram10); 
    OleDbParameter pram11 = new OleDbParameter("@Email", Email); 
    command.Parameters.Add(pram11); 
    OleDbParameter pram12 = new OleDbParameter("@Approved", Approved); 
    command.Parameters.Add(pram12); 
    OleDbParameter pram14 = new OleDbParameter("@ApprovedBY", ApprovedBY); 
    command.Parameters.Add(pram14);

Related posts

Recent Viewed