Reputation: 1393
How can I search using 3 fields on vb.net
Usually we use something like:
Dim query As String = "Insert into () values () Where id=1"
I am not really good in access or sql, so I asked.
week, sow order and piglet# are different fields, because I need to segregate in the future if the user searches only on weeks.
What I want is, get the data which is the same as what the user inputs and display it in the DGV. Is something like this possible:
Dim query As String = "Insert into (FarrowDate) values (dtpFarrow.Text) Where week=1,soworder=1,pigletnumber=0"
' display the data in the DGV '
Help please, they only gave me a 2 week deadline >.<
Upvotes: 0
Views: 61
Reputation: 13484
In your query you cannot use where
in insert
statement.Use update
statement
Update tablename set FarrowDate='' where PigletNumber='0' And Week='1' And SowOrder='1'
Upvotes: 2