dizzyfunk
10-24-2003, 03:11 AM
i want to search my DB for people with a salary between a range.
i'm using asp/vbscript & msaccess
i'm building a dynamic SQL string and here's the code for that bit:
if len(strSalarylo) > 0 then
strSQL = strSQL & " AND salary_c >= '" & strSalarylo & "' AND salary_c <= '" & strSalaryhi & "'"
end if
this tags on to:
rsIRS.Source = "SELECT * FROM resource_t WHERE validated_c = TRUE" & strSQL & ""
However i get this error:
[ODBC Microsoft Access Driver] Too few parameters. Expected 1
i have also tried this:
if len(strSalarylo) > 0 then
strSQL = strSQL & " AND salary_c BETWEEN '" & strSalarylo & "' AND '" & strSalaryhi & "'"
end if
same error occurs??
i'm using asp/vbscript & msaccess
i'm building a dynamic SQL string and here's the code for that bit:
if len(strSalarylo) > 0 then
strSQL = strSQL & " AND salary_c >= '" & strSalarylo & "' AND salary_c <= '" & strSalaryhi & "'"
end if
this tags on to:
rsIRS.Source = "SELECT * FROM resource_t WHERE validated_c = TRUE" & strSQL & ""
However i get this error:
[ODBC Microsoft Access Driver] Too few parameters. Expected 1
i have also tried this:
if len(strSalarylo) > 0 then
strSQL = strSQL & " AND salary_c BETWEEN '" & strSalarylo & "' AND '" & strSalaryhi & "'"
end if
same error occurs??