I am having an app in visual c# ,, i need to retrieve the table values of coloumn name title corresponding to a certain user id in combobox on the same form . can anyone help me doing this ?
Amanpreet_1 0 Light Poster
Recommended Answers
Jump to PostHi,
If I understand your question the combo box will have the id in it (or maybe the user's name only) so you will get the selected item of the combo box and then use that value in the sql query. You can't use parameters for column names (unless I'm …
Jump to PostYou can use as many as you like to get the job done.
Jump to PostI think it will be better to test your query in SQL first. You can do the JOIN logic in SQL and merely pass the string to SQL via a SQLCommand. Reading your previous comments led me to the conclusion that johnrosswrock's previous comment is what you need. You want …
Jump to PostPlease post your code that you use to populate your combobox with titles.
Jump to PostAm i getting this right : you want the "video_id" returned by your reader so you can pass it into another query to retrieve the values? If that is the case you need to declare the variable outside your method so you can use it in another. So
string videoID;
…
All 30 Replies
hericles 289 Master Poster Featured Poster
Amanpreet_1 0 Light Poster
hericles 289 Master Poster Featured Poster
Amanpreet_1 0 Light Poster
johnrosswrock 0 Light Poster
Amanpreet_1 0 Light Poster
johnrosswrock 0 Light Poster
Amanpreet_1 0 Light Poster
johnrosswrock 0 Light Poster
Amanpreet_1 0 Light Poster
johnrosswrock 0 Light Poster
Fenrir() 52 Newbie Poster
Amanpreet_1 0 Light Poster
Amanpreet_1 0 Light Poster
Fenrir() 52 Newbie Poster
Amanpreet_1 0 Light Poster
Fenrir() 52 Newbie Poster
Amanpreet_1 0 Light Poster
johnrosswrock 0 Light Poster
Amanpreet_1 0 Light Poster
Fenrir() 52 Newbie Poster
johnrosswrock 0 Light Poster
Amanpreet_1 0 Light Poster
Amanpreet_1 0 Light Poster
Fenrir() 52 Newbie Poster
Amanpreet_1 0 Light Poster
Fenrir() 52 Newbie Poster
Amanpreet_1 0 Light Poster
Amanpreet_1 0 Light Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.