注册 登录
编程论坛 ASP.NET技术论坛

帮我看下代码出错了

guaishi 发布于 2008-08-20 16:22, 958 次点击
Protected Sub AccessDataSource1_Selecting(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.SqlDataSourceSelectingEventArgs) Handles AccessDataSource1.Selecting
        Dim conn As New Data.OleDb.OleDbConnection
        conn.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & Server.MapPath("App_Data/#db1.mdb")
        conn.Open()
        Dim comm As New Data.OleDb.OleDbCommand
         = "select * typename from ptype where ppid=0"
        comm.Connection = conn
        Dim dr As Data.OleDb.OleDbDataReader
        dr = comm.ExecuteReader
      
        AccessDataSource1.DataFile = Server.MapPath("App_Data/#db1.mdb") '出错行
        AccessDataSource1.DataBind()
1 回复
#2
仰望星空2008-08-20 22:11
VB的看不懂,AccessDataSource1是什么东东
1