1

所以我不断收到此错误消息: 在此处输入图像描述

从我调用此 SQL 语句的函数中:

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 = ?)

不确定我的 SQL 是否关闭,因为我不是 100%,但我的想法是使用此查询更新我的数据库的内容。即使它是一个 UPDATE 查询,它告诉我它不是。

我已经尝试解决这个问题两天了,我想我现在只是迷失在树林里。

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();
    } 

任何建设性的帮助将不胜感激!

4

0 回答 0