On Thursday 15 September 2016 15:06:58 'Mark Rotteveel' [email protected] [firebird-support] wrote: > You either need to generate the necessary metadata yourself, but then you > either have to guess, or have the user provide the type. You can't use > openCursor as insert ... returning doesn't have a cursor; just like an > executable procedure it has a single result that is returned on execute. > Does calling IAttachment.prepare() in order to get the output message metadata produce a performance penalty, expecially an additional server roundtrip? I assume so. The format of the received data must be known in FB-client library when the data arrives, so it should be possible to provide an IMessageMetadata after execute(). A very comfortable solution would be when openCursor() would work for all statement types because of the problem that it is not known if openCursor() or execute() must be called before parsing the SQL statement in user code or preparing the statement. It seems that calling openCursor() with " insert into TABLE1 (STR1) values ('aabbccdd') returning PK " actually returns a valid IMessageMetadata by IResultSet.getMetadata(). What apparentely not works is fetchNext()...
Martin
