我的程序如下,看了好多遍,看不处有什么错误啊.感谢各位不厌其烦的看完我的帖子,辛苦了.
____________________________________________________________________________
<%@ import namespace="systeml.data"%>
<%@ import namespace="system.data.oledb"%>
<script language="vb" runat="server">
sub page_load(sender as object,e as eventargs)
dim conn as new oledbconnection("provider=microsoft.jet.oledb.4.0;data source=" & server.mappath("../wwwlink"))
dim cmd as new oledbcommand("select * from wwwlink",conn)
conn.open()
dim dr as new oledbdatareader=cmd.executereader()
mydatagrid.datasource=dr
mydatagrid.databind()
conn.close()
end sub
</script>
<html>
<body>
<form runat="server">
<asp:datagrid id="mydatagrid" headerstyle-backcolor="#FF0000" width="100%" runat="server"/>
</form>
</body>
</html>
______________________________________________________________________________
IE说:
Server Error in '/' Application.
--------------------------------------------------------------------------------
Compilation Error
Description: An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify your source code appropriately.
Compiler Error Message: BC30205: End of statement expected.
Source Error:
Line 6: dim cmd as new oledbcommand("select * from wwwlink",conn)
Line 7: conn.open()
Line 8: dim dr as new oledbdatareader=cmd.executereader()
Line 9: mydatagrid.datasource=dr
Line 10: mydatagrid.databind()
Source File: c:\inetpub\wwwroot\asp.net\chapter5\5-1.aspx Line: 8
[此贴子已经被作者于2007-3-23 20:42:39编辑过]