Re: How to get several resultsets from SP

2006-05-22 Thread Tom Chiverton
On Monday 22 May 2006 12:30, Adrian Lynch wrote:
> SELECT * FROM Table1
>
> IF @param = 1
>   SELECT * FROM Table2
>
> SELECT * FROM Table3

In which case 3 result sets are returned, and one of them will be null.
3 sets are always returned because that is how the SP is defined, no ?

-- 
Tom Chiverton



This email is sent for and on behalf of Halliwells LLP.

Halliwells LLP is a limited liability partnership registered in England and 
Wales under registered number OC307980 whose registered office address is at St 
James's Court Brown Street Manchester M2 2JF.  A list of members is available 
for inspection at the registered office. Any reference to a partner in relation 
to Halliwells LLP means a member of Halliwells LLP. Regulated by the Law 
Society.

CONFIDENTIALITY

This email is intended only for the use of the addressee named above and may be 
confidential or legally privileged.  If you are not the addressee you must not 
read it and must not use any information contained in nor copy it nor inform 
any person other than Halliwells LLP or the addressee of its existence or 
contents.  If you have received this email in error please delete it and notify 
Halliwells LLP IT Department on 0870 365 8008.

For more information about Halliwells LLP visit www.halliwells.com.

We are pleased to announce that Halliwells LLP has been voted AIM Lawyer of the 
Year at the 2005 Growth Company Awards


~|
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:241117
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54


RE: How to get several resultsets from SP

2006-05-22 Thread Adrian Lynch
But not what it returns.

The following in an SP will potentially return two or three result sets
which means your proc result tags can be askew.

SELECT * FROM Table1

IF @param = 1
SELECT * FROM Table2

SELECT * FROM Table3

Adrian


-Original Message-
From: Tom Chiverton [mailto:[EMAIL PROTECTED]
Sent: 22 May 2006 11:48
To: CF-Talk
Subject: Re: How to get several resultsets from SP


On Friday 19 May 2006 18:00, Adrian Lynch wrote:
> Conditional logic might change the number.

But the definition of a SP is fixed.

--
Tom Chiverton


~|
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:241116
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54


Re: How to get several resultsets from SP

2006-05-22 Thread Tom Chiverton
On Friday 19 May 2006 18:00, Adrian Lynch wrote:
> Conditional logic might change the number.

But the definition of a SP is fixed.

-- 
Tom Chiverton



This email is sent for and on behalf of Halliwells LLP.

Halliwells LLP is a limited liability partnership registered in England and 
Wales under registered number OC307980 whose registered office address is at St 
James's Court Brown Street Manchester M2 2JF.  A list of members is available 
for inspection at the registered office. Any reference to a partner in relation 
to Halliwells LLP means a member of Halliwells LLP. Regulated by the Law 
Society.

CONFIDENTIALITY

This email is intended only for the use of the addressee named above and may be 
confidential or legally privileged.  If you are not the addressee you must not 
read it and must not use any information contained in nor copy it nor inform 
any person other than Halliwells LLP or the addressee of its existence or 
contents.  If you have received this email in error please delete it and notify 
Halliwells LLP IT Department on 0870 365 8008.

For more information about Halliwells LLP visit www.halliwells.com.

We are pleased to announce that Halliwells LLP has been voted AIM Lawyer of the 
Year at the 2005 Growth Company Awards


~|
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:241114
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54


RE: How to get several resultsets from SP

2006-05-19 Thread Adrian Lynch
Conditional logic might change the number.

-Original Message-
From: Robertson-Ravo, Neil (RX)
[mailto:[EMAIL PROTECTED]
Sent: 12 May 2006 15:39
To: CF-Talk
Subject: RE: How to get several resultsets from SP


Surely if it is an SP you will know how many it is returning?!


-Original Message-
From: Michel Deloux [mailto:[EMAIL PROTECTED] 
Sent: 05 May 2006 17:02
To: CF-Talk
Subject: How to get several resultsets from SP

Hi all

I need to know dynamically the number(and metadata) of resultsets returned
after executing a Stored Procedure. I'm using CF MX 6 and SQL Server. With
CF I can do that? Any tips? Factory methods?

Cheers

MD

~|
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:240991
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54


RE: How to get several resultsets from SP

2006-05-12 Thread Robertson-Ravo, Neil (RX)
Surely if it is an SP you will know how many it is returning?!


-Original Message-
From: Michel Deloux [mailto:[EMAIL PROTECTED] 
Sent: 05 May 2006 17:02
To: CF-Talk
Subject: How to get several resultsets from SP

Hi all

I need to know dynamically the number(and metadata) of resultsets returned
after executing a Stored Procedure. I'm using CF MX 6 and SQL Server. With
CF I can do that? Any tips? Factory methods?

Cheers

MD




~|
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:240327
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54


RE: How to get several resultsets from SP

2006-05-05 Thread Dawson, Michael
You have to provide a fixed number of storedproc results tags.  If you
are unsure how many result sets may be returned from your stored proc,
then estimate the highest number and create that many storedproc result
tags.

Let's say you may have up to 20 result sets.  If you specify 20 result
sets, but your stored proc returns only three results sets, CF will not
throw an error.  However, you will need to "test" your result sets to
ensure they were populated before using them.

M!ke

-Original Message-
From: Michel Deloux [mailto:[EMAIL PROTECTED] 
Sent: Friday, May 05, 2006 11:02 AM
To: CF-Talk
Subject: How to get several resultsets from SP

Hi all

I need to know dynamically the number(and metadata) of resultsets
returned after executing a Stored Procedure. I'm using CF MX 6 and SQL
Server. With CF I can do that? Any tips? Factory methods?

Cheers

MD

~|
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:239682
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54