You are viewing a plain text version of this content. The canonical link for it is here.
Posted to derby-dev@db.apache.org by "David W. Van Couvering" <Da...@Sun.COM> on 2006/02/03 23:28:03 UTC

Paging Lance: format of empty result set

If I want to send an empty result set, do the result columns still have 
to match the expected set of result columns?  I can't see why this would 
matter.

Anybody else want to weigh in on this?

It would be a lot simpler for me if I could have a single "fake" query 
that generates a "generic" empty result set with, say, a single integer 
column, rather than compose one with the right columns for each 
unsupported metadata call.

Thanks,

David

Re: Paging Lance: format of empty result set

Posted by "David W. Van Couvering" <Da...@Sun.COM>.
OK, I will do my best to match *exactly* what is expected.  I will look 
at some of the existing stuff to use as a pattern.  However, I will have 
to leave it to you or whomever does the ODBC tests to make sure it works 
for ODBC.

David

Army wrote:
> 
> David W. Van Couvering wrote:
> 
>> OK, thanks.  I hadn't considered the RS metadata.
> 
> 
> Just a note that the result set metadata should match the defined 
> results _exactly_.  Returning an int where a short is expected, or a 
> char where a varchar is expected, or a nullable column where a "not 
> null" column is expected, etc. etc. can cause existing applications a 
> lot of problems--see DERBY-107.  Our JDBC tests might not catch it, but 
> my past experience is that ODBC applications (esp. Microsoft ones like 
> Access) will throw a fit if something is even slightly off...
> 
> Army
> 

Re: Paging Lance: format of empty result set

Posted by Army <qo...@sbcglobal.net>.
David W. Van Couvering wrote:
> OK, thanks.  I hadn't considered the RS metadata.

Just a note that the result set metadata should match the defined results 
_exactly_.  Returning an int where a short is expected, or a char where a 
varchar is expected, or a nullable column where a "not null" column is expected, 
etc. etc. can cause existing applications a lot of problems--see DERBY-107.  Our 
JDBC tests might not catch it, but my past experience is that ODBC applications 
(esp. Microsoft ones like Access) will throw a fit if something is even slightly 
off...

Army


Re: Paging Lance: format of empty result set

Posted by "David W. Van Couvering" <Da...@Sun.COM>.
OK, thanks.  I hadn't considered the RS metadata.

David

Daniel John Debrunner wrote:
> David W. Van Couvering wrote:
> 
>>If I want to send an empty result set, do the result columns still have
>>to match the expected set of result columns?  I can't see why this would
>>matter.
>>
>>Anybody else want to weigh in on this?
>>
>>It would be a lot simpler for me if I could have a single "fake" query
>>that generates a "generic" empty result set with, say, a single integer
>>column, rather than compose one with the right columns for each
>>unsupported metadata call.
> 
> 
> You have to provide a result set of the shape defined by the call. It
> will be just to confusing to do anything else. With your approach the
> ResultSetMetaData would not match the defined columns of the DMD method.
> 
> 
> Dan.
> 

Re: Paging Lance: format of empty result set

Posted by Daniel John Debrunner <dj...@apache.org>.
David W. Van Couvering wrote:
> If I want to send an empty result set, do the result columns still have
> to match the expected set of result columns?  I can't see why this would
> matter.
> 
> Anybody else want to weigh in on this?
> 
> It would be a lot simpler for me if I could have a single "fake" query
> that generates a "generic" empty result set with, say, a single integer
> column, rather than compose one with the right columns for each
> unsupported metadata call.

You have to provide a result set of the shape defined by the call. It
will be just to confusing to do anything else. With your approach the
ResultSetMetaData would not match the defined columns of the DMD method.


Dan.