Connecting Tech Pros Worldwide Forums | Help | Site Map

Results returns from stored procedures

Glenn Davy
Guest
 
Posts: n/a
#1: Nov 12 '05
hi
Wondering if anyone could help clear this up for me. I have a number of
stored procedures in an access 2000 project (connected to msde) that
return (I use the word 'return' hesitantly) a table type view of the
results.
Sometimes however I'll get a result that has a record selector on the left
of the table window for each record returned but no columns. Fidling with
the query (mostly with the return statement) and re-executing sometimes
gives me the columns back. I can't however get any method to whats
happening - any hints for me?
Thanks
Glenn

SA
Guest
 
Posts: n/a
#2: Nov 12 '05

re: Results returns from stored procedures


Glenn:

Haven't seen this; care to post a sample SP that's giving problems?
--
Steve Arbaugh

"Glenn Davy" <vmstech@tpg.com.au> wrote in message
news:pan.2003.10.29.08.30.24.871664@tpg.com.au...[color=blue]
> hi
> Wondering if anyone could help clear this up for me. I have a number of
> stored procedures in an access 2000 project (connected to msde) that
> return (I use the word 'return' hesitantly) a table type view of the
> results.
> Sometimes however I'll get a result that has a record selector on the left
> of the table window for each record returned but no columns. Fidling with
> the query (mostly with the return statement) and re-executing sometimes
> gives me the columns back. I can't however get any method to whats
> happening - any hints for me?
> Thanks
> Glenn[/color]


Glenn Davy
Guest
 
Posts: n/a
#3: Nov 12 '05

re: Results returns from stored procedures


Hi Steve
Thanks for replying - its taken days for the problem to replicate itself.
When it finally I did I bought it home to my machine, where the problem
existed. I made some cosmetic changes to the code (column order and white
space) and the problem went away. I'm not holding out for an answer, given
my lack of information, but posting it here in case someone else has a
similar issue.

The other clue might be that this file is worked on both by Access 2002
and 2000 and shuffled between the two.

Here's the latest example
---------------------------
Alter PROCEDURE LoadProductByEvent
(

@VEHICLE nvarchar(12),

@Dt datetime,

@Seq int,
@Seq_load int

)

AS

SET NOCOUNT ON



SELECT dbo.ScheduledEvent.Id_Vehicle,
dbo.ScheduledEvent.Dt_,
dbo.ScheduledEvent.Sequence_,
dbo.ScheduledMovement_Product.Sequence_Load,
dbo.ScheduledMovement_Product.Id_Product,
dbo.ScheduledMovement_Product.id,
dbo.ScheduledMovement_Product.palletequiv_qty_prod uct,
dbo.ScheduledMovement_Product.qty_product
INTO #TMP1
FROM dbo.ScheduledEvent INNER JOIN
dbo.ScheduledMovement_Product ON dbo.ScheduledEvent.id =
dbo.ScheduledMovement_Product.Id_ScheduledEvent
WHERE (dbo.ScheduledEvent.Id_Vehicle = @Vehicle) AND
(dbo.ScheduledEvent.Dt_ < @Dt) OR
(dbo.ScheduledEvent.Id_Vehicle = @Vehicle) AND
(dbo.ScheduledEvent.Dt_ = @Dt) AND
(dbo.ScheduledEvent.Sequence_ < @Seq) OR
(dbo.ScheduledEvent.Id_Vehicle = @Vehicle) AND
(dbo.ScheduledEvent.Dt_ = @Dt) AND
(dbo.ScheduledEvent.Sequence_ = @Seq) AND
(dbo.ScheduledMovement_Product.Sequence_Load < @Seq_load)

SELECT id_product,sum(palletequiv_qty_product) as load_product,
sum(qty_product) as load_qty_product FROM #TMP1
GROUP BY
id_product
HAVING sum(palletequiv_qty_product) >0

__________________________
Closed Thread