【发布时间】:2013-09-21 09:27:56
【问题描述】:
我正在尝试创建在线 CV 并将所有信息存储到 Access DB 中,我需要帮助解决以下错误,当我使用 ASP 按钮创建标签然后尝试使用标签查找时te DB中的相关信息。
以下是我的错误
“/Interactive CV”应用程序中的服务器错误。
FROM 子句中的语法错误。描述:未处理的异常 在执行当前 Web 请求期间发生。请 查看堆栈跟踪以获取有关错误和位置的更多信息 它起源于代码。
异常详细信息:System.Data.OleDb.OleDbException:语法错误 FROM 子句。
来源错误:
第 81 行:conn.Open() 第 82 行:'声明 用于读取数据库中数据的 OleDbDataReader 第 83 行:
使用 myReader 作为 OleDbDataReader = myCommand.ExecuteReader() 第 84 行: myReader.Read() 第 85 行:'创建标签源文件:C:\Users\user\Desktop\Uni Final Module\Interactive CV\File.aspx.vb 行:83
堆栈跟踪:
[OleDbException (0x80040e14): FROM 子句中的语法错误。]
System.Data.OleDb.OleDbCommand.ExecuteCommandTextErrorHandling(OleDbHResult 小时)+1081708
System.Data.OleDb.OleDbCommand.ExecuteCommandTextForSingleResult(tagDBPARAMS dbParams、对象和执行结果)+247
System.Data.OleDb.OleDbCommand.ExecuteCommandText(对象& 执行结果)+194
System.Data.OleDb.OleDbCommand.ExecuteCommand(CommandBehavior 行为,对象和执行结果)+58
System.Data.OleDb.OleDbCommand.ExecuteReaderInternal(CommandBehavior 行为,字符串方法)+167
System.Data.OleDb.OleDbCommand.ExecuteReader(CommandBehavior 行为) +116 System.Data.OleDb.OleDbCommand.ExecuteReader() +6 File.createContent(String e) in C:\Users\user\Desktop\Uni Final Module\Interactive CV\File.aspx.vb:83 File.btnContent_Click(Object 发件人,EventArgs e) 在 C:\Users\user\Desktop\Uni Final 模块\交互式简历\File.aspx.vb:51
System.Web.UI.WebControls.Button.OnClick(EventArgs e) +118
System.Web.UI.WebControls.Button.RaisePostBackEvent(字符串 事件参数)+112
System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(字符串 eventArgument) +10
System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl,字符串 eventArgument) +13
System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +36 System.Web.UI.Page.ProcessRequestMain(布尔includeStagesBeforeAsyncPoint,布尔includeStagesAfterAsyncPoint) +5563
版本信息:Microsoft .NET Framework 版本:4.0.30319; ASP.NET 版本:4.0.30319.272
【问题讨论】:
-
请改进您的问题 - 给它一些格式/结构并添加一些代码是一个好的开始;-)
-
@Mohammed Khalif- 看起来您的命令字符串格式不正确。也可以发一下吗?
标签: asp.net .net vb.net ms-access