CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 4 of 4
  1. #1
    Join Date
    May 1999
    Posts
    388

    URGENT: Opening a Database table

    Whe I open a recordset I get the following error.

    Too few parameters. Expected 1

    When I remove the m_strFilter statement ahead of Open(), then i don't get this error. my code is:

    GradesSet.m_strFilter ="Grade Like "+ sGrade;
    GradesSet.Open();

    Can somebody help me!


  2. #2
    Join Date
    May 1999
    Posts
    4

    Re: URGENT: Opening a Database table

    m_strFilter="[field name] LIKE" + sValue

    **************************
    * Cao Jiling *
    **************************

  3. #3
    Join Date
    May 1999
    Posts
    4

    Re: URGENT: Opening a Database table

    What's the field type of Grade?
    If it's int or float use >,>=, BETWEEN , etc.

    **************************
    * Cao Jiling *
    **************************

  4. #4
    Join Date
    May 1999
    Posts
    388

    Re: URGENT: Opening a Database table

    rather:

    GradesSet.m_strFilter ="[Grades].[Grade] Like " +CString("'") + sGrade + CString("'");

    thankx I got the idea!


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured