Re: FMTONLY problems
- From: "Bob Barrows [MVP]" <reb01501@xxxxxxxxxxxxxxx>
- Date: Wed, 30 May 2007 04:58:08 -0400
Bob wrote:
"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.
So that seems to be your answer isn't it? What is the point of getting the
parameter types, etc., when you already know them?
It doesn't seem to be too optimal even then though.
All right, what is not optimal?
I suspect the fmtonly is being caused by your choice to use "SELECT 0" to
return the procedure result rather than "RETURN 0". Using a return parameter
would eliminate the necessity to marshal a cursor. Create and append a
parameter with direction adParamReturnValue (it has to be the first
parameter appended to the Parameters collection), execute the command using
the adExecuteNoRecords execution option, and read the value of the return
parameter rather than using a recordset.
--
Microsoft MVP - ASP/ASP.NET
Please reply to the newsgroup. This email account is my spam trap so I
don't check it very often. If you must reply off-line, then remove the
"NO SPAM"
.
- References:
- FMTONLY problems
- From: Bob
- Re: FMTONLY problems
- From: Bob Barrows [MVP]
- Re: FMTONLY problems
- From: Bob
- Re: FMTONLY problems
- From: Bob Barrows [MVP]
- Re: FMTONLY problems
- From: Bob
- FMTONLY problems
- Prev by Date: Re: FMTONLY problems
- Next by Date: Re: Is ADO events suited for this?
- Previous by thread: Re: FMTONLY problems
- Next by thread: Can SQL do this?
- Index(es):