Click here to Skip to main content
15,916,019 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralCreateProcess - file privileges Pin
30-Apr-02 5:54
suss30-Apr-02 5:54 
GeneralRe: CreateProcess - file privileges Pin
Phil.Benson30-Apr-02 8:19
professionalPhil.Benson30-Apr-02 8:19 
GeneralRe: CreateProcess - file privileges Pin
Ram Cronus1-May-02 0:22
Ram Cronus1-May-02 0:22 
GeneralRe: CreateProcess - file privileges Pin
Phil.Benson1-May-02 21:51
professionalPhil.Benson1-May-02 21:51 
GeneralRe: CreateProcess - file privileges Pin
Ram Cronus2-May-02 4:34
Ram Cronus2-May-02 4:34 
GeneralConvert int to CString Pin
30-Apr-02 5:24
suss30-Apr-02 5:24 
GeneralRe: Convert int to CString Pin
Mike Zinni30-Apr-02 5:31
Mike Zinni30-Apr-02 5:31 
GeneralGet Integer Value from database Pin
30-Apr-02 5:52
suss30-Apr-02 5:52 
Thanks for answering me. I thought that would solve a problem that I'm having but it doesn't. So maybe you can help me with this.

The following lines of code are supposed to retrive data from a database. I know this works when all values in the database are strings. But now the first column are integers. The error I get is below. Do you know how I can fix this?

Thanks,
Alan

/***************************************/

long iID;
CString strName, strNumber;

...

while (!recset.IsEOF())
{
//Copy each column into a variable
recset.GetFieldValue("Address ID",iID);
recset.GetFieldValue("First Name",strName);
recset.GetFieldValue("Home Number",strNumber);


//Insert values into the list control
iRec = m_MyListControl.InsertItem(0,iID,1);
m_MyListControl.SetItemText(0,1,strName);
m_MyListControl.SetItemText(0,2,strNumber);

//Go to the next record
recset.MoveNext();
}

Error:
void __thiscall CRecordset::GetFieldValue(const char *,class CDBVariant &,short)' : cannot convert parameter 2 from 'long' to 'class CDBVariant &'
GeneralRe: Get Integer Value from database Pin
Nish Nishant30-Apr-02 6:03
sitebuilderNish Nishant30-Apr-02 6:03 
GeneralRe: Get Integer Value from database Pin
Alexandru Savescu30-Apr-02 6:29
Alexandru Savescu30-Apr-02 6:29 
GeneralRe: Get Integer Value from database Pin
Tom Archer30-Apr-02 7:43
Tom Archer30-Apr-02 7:43 
GeneralRe: Convert int to CString Pin
1-May-02 20:10
suss1-May-02 20:10 
GeneralLogin dialog problem Pin
solini30-Apr-02 5:23
solini30-Apr-02 5:23 
GeneralRe: Login dialog problem Pin
Thomas Freudenberg30-Apr-02 5:37
Thomas Freudenberg30-Apr-02 5:37 
GeneralRe: Login dialog problem Pin
Joaquín M López Muñoz30-Apr-02 5:39
Joaquín M López Muñoz30-Apr-02 5:39 
GeneralRe: Login dialog problem Pin
l a u r e n30-Apr-02 8:09
l a u r e n30-Apr-02 8:09 
GeneralRe: Login dialog problem - Solved Pin
30-Apr-02 8:16
suss30-Apr-02 8:16 
QuestionHowto change background color without redrawing content ? Pin
Brian van der Beek30-Apr-02 5:20
Brian van der Beek30-Apr-02 5:20 
AnswerRe: Howto change background color without redrawing content ? Pin
Joaquín M López Muñoz30-Apr-02 5:35
Joaquín M López Muñoz30-Apr-02 5:35 
GeneralRe: Howto change background color without redrawing content ? Pin
Brian van der Beek2-May-02 4:25
Brian van der Beek2-May-02 4:25 
GeneralExiting a DirectShow movie on keypress... Pin
30-Apr-02 5:12
suss30-Apr-02 5:12 
QuestionHow to get display card information by C++? Pin
yungivan30-Apr-02 5:00
yungivan30-Apr-02 5:00 
AnswerRe: How to get display card information by C++? Pin
Paul M Watt30-Apr-02 5:37
mentorPaul M Watt30-Apr-02 5:37 
GeneralSet mouse position Pin
ISIS5530-Apr-02 4:39
ISIS5530-Apr-02 4:39 
GeneralRe: Set mouse position Pin
Paul M Watt30-Apr-02 5:01
mentorPaul M Watt30-Apr-02 5:01 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.