帮忙找个错误,谢谢。。
异常详细信息: System.Data.OracleClient.OracleException: ORA-00923: 未找到预期 FROM 关键字源错误:
行 71: OracleDataAdapter da = new OracleDataAdapter(mysql, sqlcon);
行 72: dt.Clear();
行 73: da.Fill(dt);
行 74: GridView1.DataSource = dt;
行 75: GridView1.DataBind();
源文件: d:\Projects\info\guwang\kdtj.aspx.cs 行: 73
堆栈跟踪:
[OracleException (0x80131938): ORA-00923: 未找到预期 FROM 关键字
]
System.Data.OracleClient.OracleConnection.CheckError(OciErrorHandle errorHandle, Int32 rc) +204
System.Data.OracleClient.OracleCommand.Execute(OciStatementHandle statementHandle, CommandBehavior behavior, Boolean needRowid, OciRowidDescriptor& rowidDescriptor, ArrayList& resultParameterOrdinals) +1027
System.Data.OracleClient.OracleCommand.Execute(OciStatementHandle statementHandle, CommandBehavior behavior, ArrayList& resultParameterOrdinals) +25
System.Data.OracleClient.OracleCommand.ExecuteReader(CommandBehavior behavior) +138
System.Data.OracleClient.OracleCommand.ExecuteDbDataReader(CommandBehavior behavior) +4
System.Data.Common.DbCommand.System.Data.IDbCommand.ExecuteReader(CommandBehavior behavior) +7
System.Data.Common.DbDataAdapter.FillInternal(DataSet dataset, DataTable[] datatables, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior) +141
System.Data.Common.DbDataAdapter.Fill(DataTable[] dataTables, Int32 startRecord, Int32 maxRecords, IDbCommand command, CommandBehavior behavior) +162
System.Data.Common.DbDataAdapter.Fill(DataTable dataTable) +107
guwang_kdtj.BindGrid() in d:\Projects\info\guwang\kdtj.aspx.cs:73
guwang_kdtj.Page_Load(Object sender, EventArgs e) in d:\Projects\info\guwang\kdtj.aspx.cs:37
System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp, Object o, Object t, EventArgs e) +15
System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e) +33
System.Web.UI.Control.OnLoad(EventArgs e) +99
System.Web.UI.Control.LoadRecursive() +47
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1436
--------------------编程问答-------------------- OracleException,Oracle 数据引擎执行异常,没有找到 'FROM' 关键字,可能你的 Select 语句中没有 From 关键字,或者位置不对
将下句设为断点,当到达时,查看查询语句的值,看看它的值是否确
OracleDataAdapter da = new OracleDataAdapter(mysql, sqlcon); --------------------编程问答-------------------- OracleDataAdapter da = new OracleDataAdapter(mysql, sqlcon);
这个的mysql是什么,从哪里来的? --------------------编程问答-------------------- OracleDataAdapter da = new OracleDataAdapter(mysql, sqlcon);
把 mysql 贴出来看看,是不是把 FROM 误打成 FORM 了? --------------------编程问答-------------------- 谢谢楼上两位,问题解决了。。 --------------------编程问答-------------------- 的确是from的问题。。 --------------------编程问答-------------------- 应该是sql出错了
补充:.NET技术 , ASP.NET