当前位置:编程学习 > JAVA >>

第 2 行: ',' 附近有语法错误。pb9 sqlserver2000

insert into T_CC_StockBill(FID,FClassTypeID,FBillNo,FDate,FBillTypeID,FSupplyID,FPhone,FBiller,FCheckerID,FDBType,FDiffAmount,FDiffAcct,FEmpID,FDeptID,FBillerID,FCheckDate,FExplanation,FCustID,FFetchAdd,FFetchStyle,FFetchDate,FCheckerDate,FContact,FFax,FRollBackPrice,FUser,FStockInTypeID,FStockOutTypeID,FInvoiceType,FInvoiceNO,FCurPayAmount,FStatus,FPayTime,FPayOrderAmount,FAllAmount,FCheckAmount,FCurPayID,FAccountLimit,FAmount,FVoucherID,FUnCheckAmount,FClosed,FAddress,FAcctLimit,FAcctNo,FProcID,FCostVchID,FSettleLimitDate,FBalanceStyle,FCostAmount,FCurCheckAmount,FDiscountAcctId,FUserDefine1,FUserDefine2,FUserDefine3,FUserDefine4,FUserDefine5,FUserDefine6,FPrintCounts,FTotalProcurementCosts,FTitleTaxRate,FAllNetAmount,FSaveDate,FSettleAmount,FMultiAccount,FNeutralizeAmount,FInvoiceSatus,FInvoiceAmt,FNoInvoiceAmt)  values(1127,1040001,"00--00rt","2012-09-12",0,164,"",0,0,"",0,0,0,0,16401,"","",0,0,0,"","","","",0,0,81,0,"","",0,0,0,0,321,0,0,0,0,0,0,0,"","",0,0,null,"",0,0,0,0,"","","","","","",0,0,0,0,"",0,0,0,0,0,0) using sqlca1 ;

金蝶商贸4.0 导入入库单据
 messagebox(string(sqlca1.sqlcode), sqlca1.SQLErrText)
sle_2.text=sqlca1.SQLErrText
提示这个 第 2 行: ',' 附近有语法错误。 而且程序也只有一行
这样写 insert into T_CC_StockBill(FID)  values(1127) using sqlca1 ; 也是上面的提示 --------------------编程问答-------------------- 给值加个双引号试试。 --------------------编程问答--------------------


 insert into T_CC_StockBill(FID)  values('1127') using sqlca1 ; 

--------------------编程问答-------------------- 谢谢,还是不好用 --------------------编程问答-------------------- 首先看数据库类型是什么 你插入的值是什么 就算数据库的类型是字符串nvarchar类型你插入字符串的时候也可能报错 比如你插入这样一个字符串 '北大'' 这样带有'号的字符就插入不了
ssh中的xx.save(对象名)这种模式以上问题不会发生
不过你用的是 纯sql insert into table values('北大'')会报错
所以看看你插入的值是什么 debug一下把程序中的sql放到sql中运行下看看是什么地方报错不就OK了吗 --------------------编程问答-------------------- INSERT INTO T_CC_StockBill(FID) Values(1125) using sqlca1 ;
commit  using sqlca1 ;
不好用

INSERT INTO T_CC_StockBillEntry(FID) Values(1125) using sqlca1 ;
commit  using sqlca1 ;
好用
补充:Java ,  Web 开发
CopyRight © 2022 站长资源库 编程知识问答 zzzyk.com All Rights Reserved
部分文章来自网络,