Re: Timeout problem, please help - Stored procedure.sql [0/1]

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance

From: Miha Markic [MVP C#] (miha)
Date: 02/05/04


Date: Thu, 5 Feb 2004 13:52:04 +0100

Hi Giovanni,

Did you try setting SqlCommand.CommandTimeout property?

-- 
Miha Markic [MVP C#] - RightHand .NET consulting & software development
miha at rthand com
www.rthand.com
"Giovanni" <giovanni.parodi79NOSPAM@lycos.it> wrote in message
news:MPG.1a8c589253e87b06989681@208.234.59.139...
> [This followup was posted to microsoft.public.dotnet.framework.adonet and
a copy was sent to the cited author.]
>
> Hello everybody.
> I have a problem with ADO.NET when I try to connect to a SQL server
> database.
> My C# code call a stored procedure that is used to normalize a database
> in which there are a lot of mistakes (some record are lower case but
> some other are upper case etc).
> The stored procedure works fine in SQL analyzer, but when I try to use
> it in C# I have a timeout error.
> In effect when I run the procedure using osql I must wait 5  minutes to
> complete the operation(there are a lot of record inside the table that I
> must normalize) but I don't know what I must do to work with my stored
> procedure in C#. I tried to set connection timeout=600 but after 2
> minutes the C# program stops and I have a SqlException
> I don't know what to do, do you have some idea?
> The server is correctly connected, it responds to my instructions
> (
> Console.WriteLine(mySqlConnection.WorkstationId);
> Console.WriteLine(mySqlConnection.ConnectionString);
> )
> The attachments are the stored procedure and the C# code that I use,
> thanks in advance to everybody.
> PS the stored procedure isn't the original (that's complicated) but only
> a "toy" that however block my application!
> I know in advance that this it an idiot problem, but I did't arrive to
> resolve it!
> PPS the table reparto used by the stored procedure is composed by 328128
> record


Relevant Pages

  • Re: Extended Stored Procedure: Get the current db of the client
    ... with the caveat that you don't recommend it because Microsoft ... of a stored procedure versus umpteen of the same stored procedure spread ... I am not going after Gert Sue. ... the database context as a parameter if you need it, ...
    (microsoft.public.sqlserver.odbc)
  • Trying to set up a SQL Server Agent Account and I hit a wall....
    ... Our database is on SQL Server 2005, however it is set to compatibility mode ... You may need to set the compatibility level ... of the current database to a higher value to enable this feature. ... for the stored procedure sp_dbcmptlevel. ...
    (microsoft.public.sqlserver.security)
  • Re: Extended Stored Procedure: Get the current db of the client
    ... I am not going after Gert Sue. ... the database context as a parameter if you need it, ... Did you ever write an extended stored procedure? ... different than an extended stored procedure, so that is not giving you want ...
    (microsoft.public.sqlserver.odbc)
  • Re: Extended Stored Procedure: Get the current db of the client
    ... Thanks for the link Sue. ... I am not going after Gert Sue. ... the database context as a parameter if you need it, ... Did you ever write an extended stored procedure? ...
    (microsoft.public.sqlserver.odbc)
  • Re: using sp_ as a naming convention for stored procedures
    ... System stored procedures are created and stored in the master ... database and have the sp_ prefix. ... from any database without having to qualify the stored procedure name fully ... SQL Server always looks for a stored procedure ...
    (microsoft.public.sqlserver.programming)