I appreciate for all the suggestions and help i got. They all work.
But what if the querry is not in string format say if the statement is as under.
Suppose we substitute date with a field which is a number then what will be the formate.
Dim mySearchString As String
mySearchString = "Select LastName,MI, Address,State, ZipCode, Phone from tblCustomerInfo where FirstName=' " & txtFirstName.Text " ' "&" And Sdate beteween formateDateTime(txtstartdate.text) and formateDateTime(txtenddate.text)
DsCust1.Clear()
daCust.SelectCommand.CommandText = mySearchString
dgrCustomers.Refresh()
daCust.Fill(DsCust1)
End Sub
I will also like you learned people to guide me to a good book which covers these sql command requirements
yvk
|