public int UpdateFinance(int FinanceID, string FinanceData, int ArchivesNum, int FileNum, string Department, string FileTitle, string Sort, int Amount, int OrderNum, string FileStyle)
        {
            strOleDb = new StringBuilder();
            strOleDb.Append("update Finance set");
            strOleDb.Append(" FinanceData'" + FinanceData + "', ArchivesNum=" + ArchivesNum + ", FileNum=" + FileNum + ", Department='" + Department + "', FileTitle='" + FileTitle + "', Sort='" + Sort + "', Amount=" + Amount + ", OrderNum=" + OrderNum + ", FileStyle='" + FileStyle + "'");
            strOleDb.Append(" where FinanceID=" + FinanceID + "");            int i = DB.DB_ExecuteNonQuery(strOleDb.ToString());
            return i;
        }UPDATE 语句的语法错误。大虾帮忙

解决方案 »

  1.   

                strOleDb.Append(" FinanceData='" + FinanceData + "', ArchivesNum=" + ArchivesNum + ", FileNum=" + FileNum + ", Department='" + Department + "', FileTitle='" + FileTitle + "', Sort='" + Sort + "', Amount=" + Amount + ", OrderNum=" + OrderNum + ", FileStyle='" + FileStyle + "'");
      

  2.   

                strOleDb.Append(" FinanceData='" + FinanceData + "', ArchivesNum=" + ArchivesNum + ", FileNum=" + FileNum + ", Department='" + Department + "', FileTitle='" + FileTitle + "', Sort='" + Sort + "', Amount=" + Amount + ", OrderNum=" + OrderNum + ", FileStyle='" + FileStyle + "'");
      

  3.   


    UPDATE 语句的语法错误  就这个啊
      

  4.   

    郁闷。。给分了 这里谢谢fredrickhu
    每次都支持我