>Am I able to use that same code with a stored procedure instead of manually typing the query in? More specifically, can I use a WHERE statement with the stored procedure? I was trying something different and used this code:
>
>
text to cmd textmerge noshow
>[exec InTransit]
> WHERE bol_Number = ?m.fdBlNo
>endtext
>
>Something isn't right around the WHERE, maybe I can't use it if I'm already using the stored procedure, since there's already a bunch of statements in there.
>
>>>Thanks, that did the trick. I've never seen that before, I'll have to go read up on it and how it works.
>>>
>>>One last thing I need to do, but I'll try it again myself before asking.
>>>
>>I use this technique (TEXT TO lcSQL textmerge noshow) extensively in our code. The only problem in our case, is that we don't really use parameters, we embed the string into the query. I know it's a very bad practice, but our sqlexec is a separate program. It will still work if we define parameters as private variables, but somehow we never did that.
For the stored procedure it should be
>
text to cmd textmerge noshow
>[exec InTransit] ?m.fdBlNo
>endtext
Assuming your SP has just one parameter.
If it's not broken, fix it until it is.
My Blog