Re: ms sql stored procedure call returns columns in different order?

2010-12-08 Thread rex

query.getColumnNames() should be able to get your columns in the 
original order

I can see some cases where the original order is needed, like when 
outputting dynamic SQL and you want to preserve the column order, i.e. 
in a SQL client app.

On 12/8/2010 1:48 PM, Janet Whittredge wrote:
> I call a stored procedure in  and the result set returned has all of 
> the
> data the stored procedure generated, but, the column order is changed to 
> alphabetical order. Why is the resultset changed?  Is there any way to get 
> the data back as it was generated in the stored procedure?   ColdFusion 8, MS 
> SQL Server 2005, Windows Server 2003
>
> 

~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:339929
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: ms sql stored procedure call returns columns in different order?

2010-12-08 Thread Rick Root

How do you know the column order changed?

By doing ?

If so, that's not SQL Server changing the column order, that's 

Try calling #getMetaData(qry)# instead and you'll see the actual column
order as it is returned by sql server.

Rick


~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:339928
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: ms sql stored procedure call returns columns in different order?

2010-12-08 Thread John M Bliss

Order of columns should not matter.  Why does it in your case?

On Wed, Dec 8, 2010 at 3:48 PM, Janet Whittredge wrote:

>
> I call a stored procedure in  and the result set returned has all
> of the
> data the stored procedure generated, but, the column order is changed to
> alphabetical order. Why is the resultset changed?  Is there any way to get
> the data back as it was generated in the stored procedure?   ColdFusion 8,
> MS SQL Server 2005, Windows Server 2003
>
> 

~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:339927
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


ms sql stored procedure call returns columns in different order?

2010-12-08 Thread Janet Whittredge

I call a stored procedure in  and the result set returned has all of 
the 
data the stored procedure generated, but, the column order is changed to 
alphabetical order. Why is the resultset changed?  Is there any way to get the 
data back as it was generated in the stored procedure?   ColdFusion 8, MS SQL 
Server 2005, Windows Server 2003 

~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:339926
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm