These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 
Author Message
 Post subject: Stored Procedures, scalar return, column by index
PostPosted: Mon Aug 08, 2005 9:59 pm 
Newbie

Joined: Thu Jun 16, 2005 12:43 am
Posts: 4
Hello,

I have a simple stored procedure for SQL Server 2000, that does not take any parameters and returns a scalar value, which is the result of "for XML AUTO" syntax in SQL Server. Basically, it returns rows of String values.

The problem is that the column name it assigns to the single column in the result set seems to be unpredictable and able to change from request to request. I cannot find a way to assign my own column name ("as" doesn work in cases like that).
Am I missing something here....?

So, it leaves an option of retrieving the scalar by index. Unfortunately, I cannot find a way to do that, "return-property" requires the column name.

I believe it is one of those few cases when one has to acquire direct hold of Connection... but maybe I'm wrong?

thanks,
Denis.


Top
 Profile  
 
 Post subject:
PostPosted: Tue Aug 09, 2005 6:45 am 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 6:10 am
Posts: 8615
Location: Neuchatel, Switzerland (Danish)
if the result is just a scalar and you don't get a real resultset nor a predicatable way of getting it via aliases - then yes, use raw jdbc

_________________
Max
Don't forget to rate


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.