User1051635487 posted
My aspx page is
<td>
<%=GettxtR()%>
</td>
and my function is
Function GettxtR()
'Dim sConnString, sSQL As String
'Dim ranInt As Integer
'ranInt = Int((4 * Rnd()) + 1)
'Dim txtR As String = ""
'sConnString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=\TestData.mdb"
'sSQL = "SELECT * FROM test where ID=" & ranInt
'Dim conn As New System.Data.OleDb.OleDbConnection(sConnString)
'Dim cmd As New System.Data.OleDb.OleDbCommand(sSQL, conn)
'Dim dr As System.Data.OleDb.OleDbDataReader
'Dim title As String
'conn.Open()
'dr = cmd.ExecuteReader()
'Do While dr.Read()
' title = dr.Item("title")
' txtR = "<table><tr><td valign=""top"">
' txtR="HELLOHELLO"
' txtR &= "</td></tr></table>"
'Loop
'dr.Close()
'conn.Close()
return txtR
End Function
If I dont comment out this function my page is paling saying that
The Microsoft Jet database engine cannot open the file 'testdata.mdb'. It is already opened exclusively by another user, or you need permission to view its data.Thanks,