0

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. enter image description here
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 >.<

1
  • "What I want is, get the data..", SQL SELECT statement? do you want to select/get data or update data? Commented Jan 30, 2014 at 6:32

1 Answer 1

2

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'
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.