CODE
Dim aid, u As String
Dim sql, dbcomm, dbread
dbconn.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;data source=" & Server.MapPath("exp_imp.mdb")
dbconn.Open()
sql = "Select Top 1 audit_id from audit order by id desc"
dbcomm = New System.Data.OleDb.OleDbCommand(sql, dbconn)
dbread = dbcomm.ExecuteReader()
While dbread.Read
aid = dbread(0)
End While
sql = "Select * from export_import_sec1"
dbcomm = New System.Data.OleDb.OleDbCommand(sql, dbconn)
[color=#CC0000] dbread = dbcomm.ExecuteReader()
While dbread.Read
If dbread(0).audit_id=aid Then u = dbread(0).ans_1
End While
label3.text = u[/color]
Hi,
Im trying to retrieve all the records in dbread.
audit_id and ans_1 are two different fields in table.
if audit_id==aid i want ans_1 to be displayed in a label.
Could anybody help me!!
Thanks in advance..