这个是可以正常运行,放到那个分区也不可以运行了,这种事如何解释。
Partial Class show
Inherits System.Web.UI.Page
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
'Response.Write(i)
End Sub
Protected Sub Button1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim conn = New Data.OleDb.OleDbConnection("Provider=Microsoft.Jet.OleDb.4.0;Data Source=" & Server.MapPath("mdb.mdb"))
Dim sql As String = "select * from dcontd"
Dim comm = New Data.OleDb.OleDbCommand(sql, conn)
conn.open()
Dim ds As Data.OleDb.OleDbDataReader
ds = comm.ExecuteReader()
While (ds.Read())
Response.Write(Convert.ToSingle(ds("id")))
Response.Write("<br>")
Response.Write(Convert.ToString(ds("dotype")))
Response.Write("<br>")
Response.Write(Convert.ToString(ds("dtext")))
Response.Write("<br>" & "新记录:")
Response.Write(Convert.ToString(ds("daddress")))
Response.Write("<br>")
End While
ds.Close()
conn.close()
Dim sqll As String = "insert into dcontd(daddress,dtext)values('" + user.Text + "','" + pwd.Text + "')"
Dim con = New Data.OleDb.OleDbConnection("Provider=Microsoft.Jet.OleDb.4.0;Data Source=" & Server.MapPath("mdb.mdb"))
con.open()
Dim cc = New Data.OleDb.OleDbCommand(sqll, con)
cc.executenonquery()
End Sub
End Class
Partial Class show
Inherits System.Web.UI.Page
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
'Response.Write(i)
End Sub
Protected Sub Button1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim conn = New Data.OleDb.OleDbConnection("Provider=Microsoft.Jet.OleDb.4.0;Data Source=" & Server.MapPath("mdb.mdb"))
Dim sql As String = "select * from dcontd"
Dim comm = New Data.OleDb.OleDbCommand(sql, conn)
conn.open()
Dim ds As Data.OleDb.OleDbDataReader
ds = comm.ExecuteReader()
While (ds.Read())
Response.Write(Convert.ToSingle(ds("id")))
Response.Write("<br>")
Response.Write(Convert.ToString(ds("dotype")))
Response.Write("<br>")
Response.Write(Convert.ToString(ds("dtext")))
Response.Write("<br>" & "新记录:")
Response.Write(Convert.ToString(ds("daddress")))
Response.Write("<br>")
End While
ds.Close()
conn.close()
Dim sqll As String = "insert into dcontd(daddress,dtext)values('" + user.Text + "','" + pwd.Text + "')"
Dim con = New Data.OleDb.OleDbConnection("Provider=Microsoft.Jet.OleDb.4.0;Data Source=" & Server.MapPath("mdb.mdb"))
con.open()
Dim cc = New Data.OleDb.OleDbCommand(sqll, con)
cc.executenonquery()
End Sub
End Class
网络改变了我,编程改变了我的生活