requerying with Dataadapter and dataset

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi all ,
I wonder if you can help I run this code once

Dim daEmpDet2 As OleDbDataAdapter defined globally

strSQL1 = "select * From PREmpDet where Empcode='" & EmpCode & "'"
Dim dsEmpDet2 = New OleDbDataAdapter(strSQL1, cn2)
daEmpDet2.Fill(dsEmpDet2, "EmpDet2")

I get the right record when run the code the first time .
when I rerun the code with a different EmpCode I Still get the first record
what am I doing WRONG.
Thanks
 
Back
Top