[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

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

Miha
Thu Feb 05 06:52:04 CST 2004

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



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

Giovanni
Fri Feb 06 06:53:30 CST 2004

In article <#5Uyab#6DHA.632@TK2MSFTNGP12.phx.gbl>, "Miha Markic [MVP
C#]" <miha at rthand com> says...
> Hi Giovanni,
>
> Did you try setting SqlCommand.CommandTimeout property?
>
>
Thank you a lot, this was my fault, I set up only the connection
timeout!
Good bye!!!