編譯器錯誤訊息: BC30002: 型別 'sqldatasetcommand' 未定義。怎么解決﹖﹖﹖﹖
iiboy 2004-06-25 10:13:44 <%@ import namespace="system.data"%>
<%@ import namespace="system.data.sql"%>
<%@ import namespace="system.data.sqlclient"%>
<HTML>
<script language="vb" runat ="server" >
sub page_load(src as object,e as eventargs)
dim ds as dataset
dim myconnection as sqlconnection
dim mycommand as sqldatasetcommand
myconnection=new sqlconnection("server=dotnetbus;uid=Mine_Liu;pwd=mineliu;database=pubs")
mycommand=new sqldatasetcommand("select * from authors",myconnection)
ds=new dataset()
mycommand.filldataset(ds,"authors")
mydatagrid.datasource=ds.tables("authors").defaultview
mydatagrid.databind()
end sub
</script>
<body >
<center>
<h3><font face="verdana">Page_Load事件演示</font></h3>
<asp:DataGrid ID="mydatagrid" Runat =server Width=600 BackColor=white BorderColor=black ShowFooter=False CellPadding=3 CellSpacing =0 Font-Name =verdana Font-Size =8pt HeaderStyle-BackColor ="#aaaadd" maintainstate=false />
</center>
</body>
</HTML>