load one field of all the records of a table into a listbox
-
I am trying to load a particular field of all records in a table into a listbox. when i run the exe, I am getting a messagebox with the error: too few paramaters expected one. what does this type of error mean??
-
I am trying to load a particular field of all records in a table into a listbox. when i run the exe, I am getting a messagebox with the error: too few paramaters expected one. what does this type of error mean??
The database query you're executing has probably a misspelled column name. Check the SQL text. Tomasz Sowinski -- http://www.shooltz.com
What is "scratch" and why can everything be made from it?
-
I am trying to load a particular field of all records in a table into a listbox. when i run the exe, I am getting a messagebox with the error: too few paramaters expected one. what does this type of error mean??
too few paramaters expected one.
I'm sure that your SQL command is incorrect;P
Hung Son A Vietnamese student i-g.hypermart.net dlhson2001@yahoo.com -
it should be just:
m_MyListBox.AddString(myRecord.m_strField1);
you should post code if you want help with an error.. so we can see where the error is being caused. -dz
When I run it, I get the messagebox error and when the dialog appears, I donot have the fileds loaded? I have the code where I have tried to load the field.. void CMgen1View::OnInitialUpdate() { m_pSet = &GetDocument()->m_mgen1Set; CRecordView::OnInitialUpdate(); LoadListbox(); //CALLING HERE } void CMgen1View::LoadListbox() { CMgen1Doc* pDoc = GetDocument(); CListBox* pLB = (CListBox*) GetDlgItem(IDC_LIST1); CSectionSet sect(&pDoc->m_database); sect.Open(); while(!sect.IsEOF()) { pLB->AddString(sect.m_CourseID); sect.MoveNext(); } }