This discussion is archived
1 Reply Latest reply: Apr 2, 2010 8:08 AM by gdarling - oracle RSS

CreateDynaset() and sql hint problem

764355 Newbie
Currently Being Moderated
My Visual Basic 6 program try to use oo4o libray that bundel with instant client 11.1.0.7 connect to server 10.2.0.4 and call CreateDynaset() like


Set rstORA = cnORA.CreateDynaset("select /*+ ALL_ROWS */ col1,col2,col3 from table",0)

Client 10.2.0.1 work correctly, it send string
"select /*+ ALL_ROWS */ col1,col2,col3 from table"
to execute

But on client 11.1.0.7 server show it execute statement
"select col1,col2,col3 from table"

I think it is a bug? Or what is special parameter must be set before call CreateDynaset()

Thank,
Yoon
  • 1. Re: CreateDynaset() and sql hint problem
    gdarling - oracle Expert
    Currently Being Moderated
    Hi,

    Are you sure this worked correctly in 10.2.0.1? There's an old bug (4041790) where oo4o drops hints from updateable dynasets. The query actually gets issued twice when that's the case, are you checking both queries? The second one should be missing the hint.

    Anyway, some workarounds are:
    a) open the dynaset in read-only mode
    b) create a view with the hint and select from that instead.

    Hope it helps,
    Greg

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points