Using a filter in a TMSStoredProc
Posted: Wed 17 Feb 2010 22:11
I am feeding a text string to a TMSStoredProc as follows:
spGetDataX.Active := False;
spGetDataX.Prepare;
spGetDataX.Filter := 'DateSequence = ' + QuotedStr(DateToStr(dxMemDisplay.FieldByName('DateLow').AsDateTime));
spGetDataX.Filtered := True;
spGetDataX.Active := True;
and it returns no data, where as, if I use a TwwStoredProc with the identical code, I get the result set I am expecting. I am in the process of upgrading to SDAC 4.80.0.55 for RAD Studio 2010, and I use similar code like this throughout multiple apps.
I have scoured the forums and it looks like there were similar issues with the TMSQuery component, but I couldn't find anything on the TMSStoredProc. I think it has something to do with how the component parses the quotes in the string.
Any help would be appreciated.
Thanks,
Eric
spGetDataX.Active := False;
spGetDataX.Prepare;
spGetDataX.Filter := 'DateSequence = ' + QuotedStr(DateToStr(dxMemDisplay.FieldByName('DateLow').AsDateTime));
spGetDataX.Filtered := True;
spGetDataX.Active := True;
and it returns no data, where as, if I use a TwwStoredProc with the identical code, I get the result set I am expecting. I am in the process of upgrading to SDAC 4.80.0.55 for RAD Studio 2010, and I use similar code like this throughout multiple apps.
I have scoured the forums and it looks like there were similar issues with the TMSQuery component, but I couldn't find anything on the TMSStoredProc. I think it has something to do with how the component parses the quotes in the string.
Any help would be appreciated.
Thanks,
Eric