Try this one
VB Code:
  1. Adodc4.RecordSource = "select * from replenishment_details where replenishment_no like  '" & replenishment_num & "' and policy_type = '" & ptype & "'"