Expand|Select|Wrap|Line Numbers
- Select *
- From Corrosion
- Where corrpct1 >= {column in database} OR
- corrpct2 >= {column in database}
Expand|Select|Wrap|Line Numbers
- Private Sub btnDetails_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnDetails.Click
- Dim form As New frmDetails()
- Me.Hide()
- form.Show()
- Try
- cn = New OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0; Data Source=C:\Corrosion.mdb;")
- cn.Open()
- cmd = New OleDbCommand("select * from Corrosion", cn)
- dr = cmd.ExecuteReader
- While dr.Read()
- form.txtID.Text = dr(0)
- form.txtCountry.Text = dr(1)
- form.txtCompany.Text = dr(2)
- form.txtAsset.Text = dr(3)
- form.txtBlock.Text = dr(4)
- form.txtFacility.Text = dr(5)
- form.txtAreaItem.Text = dr(6)
- form.txtCode.Text = dr(7)
- End While
- Catch
- End Try
- dr.Close()
- cn.Close()
- End Sub
My questions are:
1. How can I do my query to incorporate the user entered criteria (in the where statement)?
2. How can I display ALL of the data instead of just one line?
Thank you for any help you can give.
Rhonda