0

Hi! My name is Jung and I'm new to VBNET

I have already tried many ways to write codes for "btnSearch" but seems like nothing works..
I really need help for this as the deadline is around the corner :'(

Below are my codes for Search button..

btnsearch.PNG

2
Contributors
2
Replies
17
Views
2 Months
Discussion Span
Last Post by JUNG_1
2

Try

cmbSearch.CommandText = "SELECT Assignment FROM Apu WHERE StudentID = '" & txtStudentID.Text & "';"

The format is

SELECT <fields> FROM <table> WHERE <conditions>

I strongly suggest, however, that instead of building queries by concatenation you use parameterized queries.

0

Tried it but still error but it's ok I know where I did wrong :) THANK YOU!!

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.