1

So I keep getting this error message: enter image description here

from my function that calls this SQL statement:

UPDATE    EQL_DATA1
SET       SubCategoryID = 'value', ItemSize = 'value', Ell = 'value', Tee = 'value', 
          LngEl = 'value', Chk = 'value', Bfy = 'value', Gate = 'value', Alm= 'value',
          DPV = 'value', [45Ell] = 'value', Teerun = 'value', 
          Coup = 'value', Swg = 'value'
WHERE     (SubCategoryID = ?) AND (ItemSize = ?) AND (Ell = ?) AND (Tee = ?)
          AND (LngEl = ?) AND (Chk = ?) AND (Bfy = ?) AND (Gate = ?) AND 
          (Alm = ?) AND (DPV = ?) AND ([45Ell] = ?) AND (Teerun = ?) AND 
          (Coup = ?) AND (Swg = ?)

Not sure if my SQL is off, as I'm not 100%, but the idea is to update the contents of my DB with this query. Even though it is an UPDATE query, it's telling me it's not.

I've been trying to solve this for 2 days and I think I'm just lost in the woods at this point.

C#:

private void btnSubmit_Click(object sender, RoutedEventArgs e)
    {
        int iPipeType = GetPipeNumber();

        int i = 0;
        try 
        {
            for (;i<lstNewTable.Count; i++)
            {
                daAdapter.UpdateQuery(iPipeType, SizeToSizeID(lstNewTable[i].ItemSize), (decimal)lstNewTable[i].Ell, (decimal)lstNewTable[i].Tee, (decimal)lstNewTable[i].LngEl, (decimal)lstNewTable[i].Chk,
                    (decimal)lstNewTable[i].Bfy, (decimal)lstNewTable[i].Gate, (decimal)lstNewTable[i].Alm, (decimal)lstNewTable[i].DPV, (decimal)lstNewTable[i]._45Ell,
                    (decimal)lstNewTable[i].Teerun, (decimal)lstNewTable[i].Coup, (decimal)lstNewTable[i].Swg);
            }
        }
        catch(Exception msg)
        {
            MessageBox.Show(msg.Message + "\n" + msg.GetBaseException().ToString(),"Error", MessageBoxButton.OK, MessageBoxImage.Exclamation); 
        }

        this.Close();
    } 

Any constructive help would be greatly appreciated!

onedaywhen
  • 55,269
  • 12
  • 100
  • 138
Uchiha Itachi
  • 1,251
  • 1
  • 16
  • 42

0 Answers0