phil31
asked on
DTS- Invalid Pointer error
Hi,
I'm using MS SQL Server 7
I've created a simple stored procedure which works fine from the query analyzer.
However when I run it from with a DTS package, I get the message:
INVALID POINTER. I've tried using the USE statement which doesn't work either.
The stored procedure is as follows:
declare @rcnt int
declare @total int
declare @totaled char(30)
declare @player char(30)
declare @player2 real
declare @msgline char(10)
declare fincursor scroll cursor for (select inctrn,insize from rminvmfl where inctrn = "01323")
open fincursor
print @@cursor_rows
set @rcnt = 0
set @total = 0
fetch first from fincursor into @player,@player2
while (@rcnt < @@cursor_rows)
begin
if(@player2 = 1.00)
set @player2 = @player2 * 75.29
set @total = (@total + @player2)
set @totaled = @total
set @rcnt = @rcnt + 1
set @msgline = @player2
print @player + @msgline + @totaled
fetch next from fincursor into @player,@player2
end
print "total = "
set @msgline = @total
print @msgline
deallocate fincursor
Any help would be appreciated. Thanks
Phil31
I'm using MS SQL Server 7
I've created a simple stored procedure which works fine from the query analyzer.
However when I run it from with a DTS package, I get the message:
INVALID POINTER. I've tried using the USE statement which doesn't work either.
The stored procedure is as follows:
declare @rcnt int
declare @total int
declare @totaled char(30)
declare @player char(30)
declare @player2 real
declare @msgline char(10)
declare fincursor scroll cursor for (select inctrn,insize from rminvmfl where inctrn = "01323")
open fincursor
print @@cursor_rows
set @rcnt = 0
set @total = 0
fetch first from fincursor into @player,@player2
while (@rcnt < @@cursor_rows)
begin
if(@player2 = 1.00)
set @player2 = @player2 * 75.29
set @total = (@total + @player2)
set @totaled = @total
set @rcnt = @rcnt + 1
set @msgline = @player2
print @player + @msgline + @totaled
fetch next from fincursor into @player,@player2
end
print "total = "
set @msgline = @total
print @msgline
deallocate fincursor
Any help would be appreciated. Thanks
Phil31
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
usually if there is a problem with DTS running a package while you can run it w/o error in Anylyzer it's cause by a permission problem or a location problem. I.e. DTS doesn't have access to a resource that's needed.
Explain the DTS more perhaps