vb.net - How to retrieve data from SQL database in vb. net? -


i have problem in retrieving data database.. have 3 textboxes , textbox1 applicant_num, textbox2 applicant_name , textbox3 lot_num , want view data in listview.. how can data database using vb.net? hope can me.. thanks.

code here:

dim sql string = "select * pambujan app_num = '" & textbox1. text & "',  app_name = '" & textbox2. text & "',  lot_num = '" & textbox3. text &"'" 

the syntax accessing text property of text boxes incorrect. also, dynamic clause being generated should use 'and' instead of commas. this:

dim sql string = "select * pambujan app_num = '" & textbox1.text & "' , app_name = '" & textbox2.text & "' , lot_num = '" & textbox3.text &"';" 

Comments

Popular posts from this blog

java - nested exception is org.hibernate.exception.SQLGrammarException: could not extract ResultSet Hibernate+SpringMVC -

sql - Postgresql tables exists, but getting "relation does not exist" when querying -

asp.net mvc - breakpoint on javascript in CSHTML? -