Click to See Complete Forum and Search --> : URGENT: Opening a Database table


Shahzad
May 16th, 1999, 10:50 PM
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!

CaoJi
May 17th, 1999, 12:17 AM
m_strFilter="[field name] LIKE" + sValue

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

CaoJi
May 17th, 1999, 12:20 AM
What's the field type of Grade?
If it's int or float use >,>=, BETWEEN , etc.

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

Shahzad
May 17th, 1999, 12:35 AM
rather:

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

thankx I got the idea!