Hello there! I'm a newbie in VB10 I would like to ask 'how to insert my data in SQL server to Listbox in VB10'
I managed to insert,delete, and even update the data in SQL SERVER my only problem is how to make a search function so that if I want to search a specific data on my DB it will appear on ListBox. I do this because I want to avoid using datagrid and connecting the datasource on it.
BTW I do the INSERT,UPDATE,DELETE by using one textbox and one button...
SQL server database on listbox in VB10
Page 1 of 11 Replies - 107 Views - Last Post: 26 January 2013 - 04:02 AM
Replies To: SQL server database on listbox in VB10
#2
Re: SQL server database on listbox in VB10
Posted 26 January 2013 - 04:02 AM
You haven't mentioned the fourth, most important, keyword: SELECT
http://msdn.microsof...y/ms179859.aspx
Once you've got the data you could loop through the data adding items to the list box.
Dim cmd as New SqlCommand("SELECT field1, field2 FROM table1 WHERE field1 LIKE @searchterm"
cmd.Parameters.Add("@searchterm", searchString +"%")
http://msdn.microsof...y/ms179859.aspx
Once you've got the data you could loop through the data adding items to the list box.
Page 1 of 1
|
|

New Topic/Question
Reply



MultiQuote



|