Populate a lisbox in Windows Form from MYSQL
-
Friday, April 13, 2012 3:05 AM
I am having trouble understanding how to make a listbox on a windows form populate with mysql database data.
Does anyone have a simple example of how to?
All Replies
-
Sunday, April 15, 2012 6:58 PM
hmm alot of readers but no answers let me elaborate with some code:
ListBox1->Datasource = "LP" //Table name ListBox1->DisplayMember = "Plyr" //Column name
And I went to Tools->Connect to Database and used a Mysql databse, So what am i missing? I tried to Data Bind the listbox but it kept saying: VCFilter::URLhandler is deprecated and is no longer implemented, can somebody help please?
-
Monday, April 16, 2012 7:10 AMModerator
Hi CSTech,
I'd like to clarify with you about the application type. Is it a Win32 Windows application, CLR Windows Forms application, of MFC dialog-based application? If it is about MFC application, I suggest you refer to the following articles for useful informations:
Accessing: MySQL Database using MySQL C API: http://www.codeproject.com/Articles/34646/Accessing-MySQL-data-base-using-MySQL-C-API.
MFC and MySQL: http://www.codeproject.com/Articles/2731/MFC-and-MySQL.Best regards,
Helen ZhaoHelen Zhao [MSFT]
MSDN Community Support | Feedback to us
- Proposed As Answer by Helen ZhaoModerator Monday, April 23, 2012 2:23 AM
-
Monday, April 16, 2012 4:55 PMwin32
-
Monday, April 16, 2012 5:07 PMAll I am really trying to do is get the data from the table into the listbox on my windows form which is in win32 mode. all it shows me is the listbox with a black border around the first entry but no words or information
-
Monday, April 16, 2012 5:21 PM
check these tutorial this may help you out
http://www.caspercomsci.com/pages/visualcplussource.htm
- Marked As Answer by Helen ZhaoModerator Monday, April 23, 2012 2:23 AM

