datalist无法显示数据。(无错误信息)
代码如下:
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs)
If Not IsPostBack Then
Dim sqlstr As String = "SELECT id, title, content FROM page WHERE (pagecode = 1) "
Dim connstr As String = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=E:\Documents and Settings\App_Data\page.mdb "
Dim objcon As New OleDbConnection(connstr)
Dim objdataset As New DataSet()
Dim objajapter As New OleDbDataAdapter(sqlstr, objcon)
Try
objajapter.Fill(objdataset, "code ")
Dim objDataView As New DataView(objdataset.Tables( "code "))
Datal.DataSource = objDataView
Datal.DataBind()
Catch objError As OleDbException
If Left(objError.Message, 21) = "Login failed for user " Then
ddc.Text = "Problem with Log-in "
ElseIf Left(objError.Message, 19) = "Could not find file " Then
ddc.Text = "We could not find the MDB file that you asked for "
Else
ddc.Text = " <br /> message - " & &