<%@ import namespace="system.data.sql" %>
改为
<%@ import namespace="System.Data.SqlClient" %>

解决方案 »

  1.   

    你定义了dr,但没有给它的值,如:
    dr=mycommand.(...)
    还有,你的连接字符串是否正确。
      

  2.   

    命名空间写错了,那是以前BETA版的。
      

  3.   

    加上<%@Page Language="VB"%>
    <script>中的代码最好放到Page_Load中sqlconnection改为SqlConnection
    sqlcommand改为SqlCommand
    open 改为Open
    如下
    <script language=vb runat=server>
    Sub Page_Load()
          dim connstring,commstring as string
          dim myconnection as SqlConnection
          dim mycommand as SqlCommand
          dim dr as datareader
          connstring="server=localhost,database=pubs"
          commstring="select * from authors"
          myconnection=new SqlConnection(connstring)
          mycommand=new SqlCommand(commstring,myconnection)
          mycommand.activeconnection.Open
          mycommand.exeute(dr)
    End Sub
    </script>
      

  4.   

    to:bluefish922(思念里的流浪鱼)
    我是按书上面写的?以前的beta 版和现在不一样了吗?