Skip to Content
1
Jan 03, 2012 at 03:08 PM

How can specify a SQL hint from an existing report?

26 Views

I am porting an app from COM based CR to CR Visual Studio 2010. I've managed to update my database connection on the fly thanks to help on this forum. Now I want to get an Oracle style hint into my SQL. I've read all the threads lamenting the passing of SQLQueryString, so there appears to be no easy answer to this. I have a number of table linked reports that in the old version would take the SQLQueryString, and replace WHERE with WHERE /*+ <hinttext> */ . My OleDBProvider then interprets the hint text to do various options. Is there some way I can get this hintext string into my SQL? It doesn't have to go in any particular place in the SQL statement, it just needs to be there somewhere and I need to be able to generate the <hinttest> at runtime.

-nld