Re: Timing out????
From: Ralph Krausse (gordingin_at_consiliumsoft-nospam.com)
Date: 06/28/04
- Next message: Narayana Vyas Kondreddi: "Re: Timing out????"
- Previous message: Narayana Vyas Kondreddi: "Re: Timing out????"
- In reply to: Narayana Vyas Kondreddi: "Re: Timing out????"
- Next in thread: Ralph Krausse: "Re: Timing out????"
- Messages sorted by: [ date ] [ thread ]
Date: Mon, 28 Jun 2004 11:30:41 -0400
Thanks I will try that. And to y I am using a cursor, well I am new to SQL
programming and well it worked when the table was small... :) Learning,
Learning, Learning...
"Narayana Vyas Kondreddi" <answer_me@hotmail.com> wrote in message
news:%23Nl6CSSXEHA.2520@TK2MSFTNGP12.phx.gbl...
> I don't see a real need for a CURSOR in your stored proc. Unless I am
> missing something, it should be something like this:
>
> UPDATE LookUp
> SET Active = '0'
> FROM
> LookUp AS L
> INNER JOIN
> tbDateDiff AS T
> ON L.IPSource = T.IP
>
> SET @IPResetCount = @@ROWCOUNT
>
> Also, do not use sp_ prefix, as that is reserved for system stored
> procedures, and means something different to SQL Server.
> --
> HTH,
> Vyas, MVP (SQL Server)
> http://vyaskn.tripod.com/
> Is .NET important for a database professional?
> http://vyaskn.tripod.com/poll.htm
>
>
> "Ralph Krausse" <gordingin@consiliumsoft-nospam.com> wrote in message
> news:uXQtoMSXEHA.796@TK2MSFTNGP10.phx.gbl...
> I am getting this error message with my SP
>
>
___________________________________________________________________________
>
> [Microsoft][ODBC SQL Server Driver][DBNETLIB]ConnectionRead
(WrapperRead()).
> Server: Msg 11, Level 16, State 1, Line 0
> General network error. Check your network documentation.
>
> Connection Broken
>
___________________________________________________________________________
>
>
> ** My SP
>
>
>
> ALTER PROCEDURE sp_CleanUp
> as
> SET NOCOUNT ON
>
> DECLARE @IPResetCount BIGINT
> SET @IPResetCount = 0
>
> DECLARE tbDateDiff_cursor CURSOR FOR SELECT * FROM tbDateDiff
> OPEN tbDateDiff_cursor
> DECLARE @IP CHAR(16)
> FETCH NEXT FROM tbDateDiff_cursor Into @IP
> WHILE @@FETCH_STATUS = 0
> BEGIN
> Update LookUp Set Active = '0' where IPSource = @IP
> SET @IPResetCount = @IPResetCount + 1
> FETCH NEXT FROM tbDateDiff_cursor Into @IP
> END
> Close tbDateDiff_cursor
> DEALLOCATE tbDateDiff_cursor
>
>
> Print COnVERT(char(40),@IPResetCount)
> return @IPResetCount
>
>
> GO
> --------------------------------------------------------------
>
> If I remove the code
>
> Update LookUp Set Active = '0' where IPSource = @IP
>
> this SP NEVER returns that error.
>
> btw. the 'tbDateDiff' table has 227,000+ records in it...
>
>
> ANYONE???? PLS.....
>
>
> Thanks
> Ralph Krausse
> www.consiliumsoft.com
> Use the START button? Then you need CSFastRunII...
> A new kind of application launcher integrated in the taskbar!
> ScreenShot - http://www.consiliumsoft.com/ScreenShot.jpg
>
>
>
- Next message: Narayana Vyas Kondreddi: "Re: Timing out????"
- Previous message: Narayana Vyas Kondreddi: "Re: Timing out????"
- In reply to: Narayana Vyas Kondreddi: "Re: Timing out????"
- Next in thread: Ralph Krausse: "Re: Timing out????"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|