zombie_man23
June 23rd, 2005, 11:25 AM
I have a query builder that can save the information on the template to the db. The user can also load those saved templates. My problem is, I placed a second where clause that the user can utilize. I save both where clauses fine. But getting both where clauses is causing me some problems. Here is what was origionally used when there was only one where clause:
--------------------------------------------------------------------------------------------
SELECT * FROM rep_temp_where WHERE tempid=" & lngTemplateID, gcnData, adOpenForwardOnly, adLockReadOnly
--------------------------------------------------------------------------------------------
Now I need a way to select the min and max whereid value for a specific template.
Here is what I have currently for the max value.
--------------------------------------------------------------------------------------------
SELECT max(whereid), tempid, field_name, oper From rep_temp_where where tempid=" & lngTemplateID & " group by tempid, field_name, oper" & gcnData, adOpenForwardOnly, adLockReadOnly
-------------------------------------------------------------------------------------------
When I run this I get an error saying:
An error has occurred in Load Template:
3001 - Arguments are of the wrong type, are out of acceptable range, or are in conflict with one another.
Any suggestions???
--------------------------------------------------------------------------------------------
SELECT * FROM rep_temp_where WHERE tempid=" & lngTemplateID, gcnData, adOpenForwardOnly, adLockReadOnly
--------------------------------------------------------------------------------------------
Now I need a way to select the min and max whereid value for a specific template.
Here is what I have currently for the max value.
--------------------------------------------------------------------------------------------
SELECT max(whereid), tempid, field_name, oper From rep_temp_where where tempid=" & lngTemplateID & " group by tempid, field_name, oper" & gcnData, adOpenForwardOnly, adLockReadOnly
-------------------------------------------------------------------------------------------
When I run this I get an error saying:
An error has occurred in Load Template:
3001 - Arguments are of the wrong type, are out of acceptable range, or are in conflict with one another.
Any suggestions???