I need to get rid of a join hint warning

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi

I am having trouble with an Access report in an ADP project. I am executing a stored proceudre that uses a join hint for performance reasons. The query runs great in SQL Query Analyzer but when I run my report in Access I get a message box that says, "Warning: The join order has been enforced because a local join hint is used." I click OK and the report goes back to design mode. I get the same message in SQL Query Analyzer but I do get results. I tried turning ANSI_WARNINGS off but I guess it's not an ANSI warning. I also tried putting a handler in Report_Error and setting Response to acDataErrContinue. That didn't work either. How do I get rid of this warning message

Thanks
Darren
 
Darren:

The On Error event will handle Access generated errors, but not ADO
generated errors which is more than likely where the error is arising.

You might try changing the way the sproc is reference by the report; i.e. if
you have the sproc name set as the record source you might try eliminating
that and using code in the On Open event like this:

Me.RecordSource = "Exec [Name of you Sproc Here]"

which will use SQL's Exec macro execute the sproc, rather than having ADO do
it directly.

HTH
 
Back
Top