2023-01-11 18:04:55.1704
cmd.CommandText = "UP DATE {代码库} SET 代码说明 = '" & e.PostValues("代码说明") & "',类型 = '" & e.PostValues("类型") & "',网址 = '" & e.PostValues("网址") & "',代码 = '" & e.PostValues("代码") & "' WHERE 编号 = '" & e.PostValues("编号") & "'"
cmd.ExecuteReader()
为什么我在代码文本里面添加了’1,就会提示报错,如果包含只要有'就会报各种错误
事件/函数:
字符串 ')' 后的引号不完整。
'1' 附近有语法错误。
在 System.Data.OleDb.OleDbCommand.ExecuteCommandTextErrorHandling(OleDbHResult hr)
在 System.Data.OleDb.OleDbCommand.ExecuteCommandTextForSingleResult(tagDBPARAMS dbParams, Object& executeResult)
在 System.Data.OleDb.OleDbCommand.ExecuteCommandText(Object& executeResult)
在 System.Data.OleDb.OleDbCommand.ExecuteCommand(CommandBehavior behavior, Object& executeResult)
在 System.Data.OleDb.OleDbCommand.ExecuteReaderInternal(CommandBehavior behavior, String method)
在 System.Data.OleDb.OleDbCommand.ExecuteReader(CommandBehavior behavior)
在 System.Data.OleDb.OleDbCommand.System.Data.IDbCommand.ExecuteReader(CommandBehavior behavior)
在 System.Data.Common.DbDataAdapter.FillInternal(DataSet dataset, DataTable[] datatables, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior)
在 System.Data.Common.DbDataAdapter.Fill(DataTable[] dataTables, Int32 startRecord, Int32 maxRecords, IDbCommand command, CommandBehavior behavior)
在 System.Data.Common.DbDataAdapter.Fill(DataTable dataTable)
在 Foxtable.SQLCommand.ExecuteReader(Boolean Save)
[此贴子已经被作者于2023/1/11 18:09:51编辑过]