Click here to Skip to main content
15,887,340 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hello
I have vb.net projects (Desktop Application)and they contains databases in access and the other in sql server.
My questions is :
If I have a table like this :

id, title, description, date, time

and I wanna to display only the titles of the data stored in the form, and when the user click on the title it's shows the other data related to the id the user choose.
how I can do that?
Posted

1 solution

You just Write SQL Query to Filter such data...

Say for Example, I've placed a TextBox with name txtTitle, in which user gonna to specify Title...
VB
'To Load List of Titles
QRY = "SELECT Title FROM Your_Table_Name GROUP BY Title"
' Setup Execute SqlCommand With Above Query
' Loop through available Data...


' Now Writing Select Query to Fetch Data Available with Selected Title...
Qry = "SELECT * FROM Your_Table_Name WHERE Title = '" & txtTitle.Text & "'"
' Setup Execute SqlCommand With Above Query
' Display Readed Data...
 
Share this answer
 
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900