Start a new topic

Can CrushFTP use stored procedures instead of parameterized queries?

codewzrd @ Fri May 23 11:14:24 EEST 2014

Our company prefers that all queries to databases via applications be done by using stored procedures.

I updated the user queries by wrapping them in stored procedures and making the change to EXEC those stored procs. But I see in the logs that for some of them, an ORDER BY clause is being appended to certain queries like when trying to get web buttons. I have EXEC spCrushGetWebButtonsByUserID '1' which works but the log shows
05/23/2014 11:56:44 AM|SQL:Querying WEB_BUTTONS:EXEC spCrushGetWebButtonsByUserID '1' ORDER BY SORT_ORDER
05/23/2014 11:56:44 AM|crushadmin:(972)- (control)
05/23/2014 11:56:44 AM| Incorrect syntax near the keyword 'ORDER'.

Is using stored procedures possible?


spinkb @ Sat May 24 22:25:54 EEST 2014
New build now makes this a little more dynamic.

It will only append 'ORDER BY {value}'.... if the sql statement starts with 'SELECT'.

So if a table has "SORT_ORDER" just always return things sorted on that for your stored proc.

Events are assumed to be loaded alphabetically, but it really shouldn't matter.

These are in t he latest build now. 7.0.2_180.

spinkb @ Sat May 24 22:26:28 EEST 2014
To get the new build, go to the about page and click update now.

Login to post a comment