Guest
|
Posted: Mon May 14, 2007 7:28 pm Post subject: Adding filter in a query on C++ and MS-ACcess |
|
|
qryMillcGetByTypeApp_AppQuery its a stored query in MS-ACCESS
defination:
PARAMETERS prmMillToolType Long;
SELECT MILLC.ID, MILLC.InsMillBdyID AS [Tool ID], MILLC.SubType,
MILLC.Radius AS [End Radius], MILLC.CuttingDia AS [Tool Dia],
MILLC.EffAxlCutLen AS [Effec Cut Length], MILLC.OverallLen AS [Overall
Length], MILLC.HandOfCut AS [Hand Of Cut], MILLC.NoOfFlutes AS [No Of
Flutes], MILLC.TmcID AS [Tool Class], MILLC.Comment, MILLC.Protrusion,
MILLC.ShankDia, millC.ShoulderLen AS [Shoulder Length]
FROM MILLC
WHERE (((MILLC.[Mill Tool Type])=[prmMillToolType]) AND ((MILLC.
[ON])=True))
ORDER BY MILLC.ID;
I need to give filter on stored query.
filter in the form of string.
eg...
WHERE ID > -1 AND [Tool Dia] >= 0.000000 AND [Tool Dia] <= 5.000000"
but when i execute this stroed query filter wont work.
In c++
piCommand->Execute(NULL, NULL,adCmdStoredProc,&piRecordSet)
query is running fine but it is giving same answers what i wrote the
defination of
of that query. |
|