【Z】使用OleDbCommandBuilder时出现“Insert into 语句的语法错误”

xiaoxiao2021-02-28  52

有些时候,使用DataAdapater的upata方法时候,会报出一个运行时错误:”Insertinto语句的语法错误“。

我们需要照着一下进行修改一下CommandBuilder对象

OleDbDataAdapter oleSub=new OleDbDataAdapter(sql,oleCn);OleDbCommandBuilder cb1=new OleDbCommandBuilder(oleSub);cb1.QuotePrefix="[";cb1.QuoteSuffix="]";

注意红色文本。。。

转载请注明原文地址: https://www.6miu.com/read-73062.html

最新回复(0)