<%@ Import namespace="System.Data"%>
<%@ Import namespace="System.Data.OleDb"%>
<script language="c#" runat="server">
void Page_Load()
{
string strConnection=" Provider=Microsoft.Jet.OleDb.4.0;";
strConnection +=@"Data Source=E:\zhangtianxing\bianchengleyuan\csharp\image.mdb";
string strSQL="select * from image";
OleDbConnection objConnection=new OleDbConnection(strConnection);
objConnection.Open();
OleDbCommand objCommand=new OleDbCommand(strSQL,objConnection);
zhangtianxing.DataSource=objCommand.ExecuteReader(CommandBehavior.CloseConnection);
zhangtianxing.DataBind();
}
</script>
<body>
<asp:datagrid id="zhangtianxing" runat="server"/>
</body>
错误提示:异常详细信息: System.Data.OleDb.OleDbException: FROM 子句语法错误。
我保证地址啊,字段啊,都没有错?
Cats萌萌
慕少森