Re: FMTONLY problems




"Bob Barrows [MVP]" <reb01501@xxxxxxxxxxxxxxx> wrote in message
news:u9moIvjoHHA.3736@xxxxxxxxxxxxxxxxxxxxxxx
Bob wrote:
"Bob Barrows [MVP]" <reb01501@xxxxxxxxxxxxxxx> wrote in message
news:OQAeAwYoHHA.4516@xxxxxxxxxxxxxxxxxxxxxxx

You failed to provide the ADO code that is causing this behavior.


OleCheck(Cmd.QueryInterface(ADOCommandConstruction,
ADOCommandConstructionObj));
OleCheck(ADOCommandConstructionObj.OLEDBCommand.QueryInterface(ICommand,
ICommandObj));

// there was a whole lot more code here to get parameter types,
names and direction etc

So do you get the FMTonly problem if you execute this Command without
bothering to get paameter types, etc?


No. Without the QueryInterface lines in the example I don't get the FMTONLY
errors. It doesn't seem to be too optimal even then though.

Instead I get
exec sp_executesql with the correct data
exec sp_executesql with the correct data
exec sp_executesql with the correct data
SET NO_BROWSETABLE ON
A correct FMTONLY
SET NO_BROWSETABLE OFF
exec sp_executesql with the correct data


With the QueryInterface lines in there I get
SET NO_BROWSETABLE ON
The Bad FMTONLY
set fmtonly off
SET NO_BROWSETABLE OFF
exec sp_executesql with the correct data
exec sp_executesql with the correct data
exec sp_executesql with the correct data
SET NO_BROWSETABLE ON
A correct FMTONLY
SET NO_BROWSETABLE OFF
exec sp_executesql with the correct data



.