Re: [PHP-DEV] patch: odbc_execute with output parameters From: Kees van Veen (cvn <email protected>)
Date: 04/10/00

Andreas Karajannis wrote:

> Thanks for your patch, but are you shure it works? I've set the parameters to be
> input only in SQLBindParameter(), but it wouldn't surprise me if some drivers
> silently ignore this flag.

Thanks for your reply first of all.
Well, it works with the ODBC driver of our proprietary database system, which, as I
checked, ignores the 'input-only' flag.

> Aren't you getting Segmentation violations when the driver tries to copy values
> back, since you probably didn't allocate storage space?

No, I don't. I've tried to run scripts several times with (and without) persistent
connections (and a minimal number of spare servers), so I thought
'pval_copy_constructor' did the trick for me, i.e. it seems to copy the contents of
the array parameter into the temp array.

But I didn't think it would be that easy, else you would probably have implemented it
yourself. Since we use a lot of 'stored procedures' with output parameters, we're
very keen on getting it to work. Maybe you could help me as to the storage
implications of 'pval_copy_constructor' and the way to go about it.

> Another potential problem would arise if any of the output parameters are LOBs, as
> those would have to be fetched in chunks.

Right. Do you have any ideas on how to go about that. I mean, would the output be
stored in a file ?

I'm willing to help, but I've only 'discovered' php since a couple of weeks, and so
far the only show-stopper for us was not having output parameters. We don't use blobs
as output parameters, so we can live without them, but it would be nice to 'complete'
the API.

Hope you can help any further.

Cheers,
Kees