locked
Database in MFC RRS feed

  • Question

  • Hii Every one,

    I have problem that ' How to take integer value from GetFieldValue() function'

    my query is '

    CString userid;

     

    userid=L

    "select max(UserID) from User";

    and i want to get ID

    Please help me ,

    thanks in advance

    Wednesday, March 9, 2011 5:11 AM

Answers

  • Hii Every one,

    I have problem that ' How to take integer value from GetFieldValue() function'

    my query is '

     

    "select max(UserID) from User";

    and i want to get ID

    Please help me ,

    thanks in advance

     

    CString userid;

     

    userid=L


    Is it a database problem?

    Your problem is convert string to integer.

    #using <mscorlib.dll>
    using namespace System;
    using namespace System::Globalization;

    ...

    ...

    Convert::ToInt32( numericStr )

     

    Choose a proper title

    • Marked as answer by hari_621 Wednesday, March 9, 2011 6:49 AM
    Wednesday, March 9, 2011 6:44 AM

All replies

  • Hii Every one,

    I have problem that ' How to take integer value from GetFieldValue() function'

    my query is '

     

    "select max(UserID) from User";

    and i want to get ID

    Please help me ,

    thanks in advance

     

    CString userid;

     

    userid=L


    Is it a database problem?

    Your problem is convert string to integer.

    #using <mscorlib.dll>
    using namespace System;
    using namespace System::Globalization;

    ...

    ...

    Convert::ToInt32( numericStr )

     

    Choose a proper title

    • Marked as answer by hari_621 Wednesday, March 9, 2011 6:49 AM
    Wednesday, March 9, 2011 6:44 AM
  • thanks for your valueable hint,

    i got answer

    thanks

    Wednesday, March 9, 2011 6:50 AM