473,386 Members | 1,598 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

Timeout Expired

I am using vb.net to process a SP
The sp are insert XXX select () statment, there are two parameters , Start
Company code and End Company Code,
The user input the range From A to Z or From A to B.
I found that If the range is A to C , the SP runs fine , if the range is A
to Z , I will got Timeout Expired error,
If I run the SP in SQL analyzer, everyting go fines.
Does the error belong to vb.net ?

Dim cmd As New SqlClient.SqlCommand
cmd.Connection = conSea
cmd.CommandText = "dbo.sel_cs_company"
cmd.CommandType = CommandType.StoredProcedure
cmd.Parameters.Add(New SqlParameter("@reportid",
SqlDbType.VarChar, 20)).Value = Me.pReportId

cmd.ExecuteNonQuery()
cmd.Parameters.Clear()
cmd.Dispose()

--
Thanks !

--
..
Nov 21 '05 #1
6 7229
Agnes,

In this code is not much VBNet except that you uses "dim" furter it is exact
the same as C# without row end stuff.

You can use the
cmd.CommandTimeout = 160

However when it stays I would ask it in the newsgroup
Adonet
news://msnews.microsoft.com/microsof...amework.adonet

Web interface:
http://communities2.microsoft.com/co...amework.adonet

I hope this helps?

Cor

"Agnes" <ag***@dynamictech.com.hk>
I am using vb.net to process a SP
The sp are insert XXX select () statment, there are two parameters , Start
Company code and End Company Code,
The user input the range From A to Z or From A to B.
I found that If the range is A to C , the SP runs fine , if the range is A
to Z , I will got Timeout Expired error,
If I run the SP in SQL analyzer, everyting go fines.
Does the error belong to vb.net ?

Dim cmd As New SqlClient.SqlCommand
cmd.Connection = conSea
cmd.CommandText = "dbo.sel_cs_company"
cmd.CommandType = CommandType.StoredProcedure
cmd.Parameters.Add(New SqlParameter("@reportid",
SqlDbType.VarChar, 20)).Value = Me.pReportId

cmd.ExecuteNonQuery()
cmd.Parameters.Clear()
cmd.Dispose()

--
Thanks !

--
.

Nov 21 '05 #2
Agnes,

In this code is not much VBNet except that you uses "dim" furter it is exact
the same as C# without row end stuff.

You can use the
cmd.CommandTimeout = 160

However when it stays I would ask it in the newsgroup
Adonet
news://msnews.microsoft.com/microsof...amework.adonet

Web interface:
http://communities2.microsoft.com/co...amework.adonet

I hope this helps?

Cor

"Agnes" <ag***@dynamictech.com.hk>
I am using vb.net to process a SP
The sp are insert XXX select () statment, there are two parameters , Start
Company code and End Company Code,
The user input the range From A to Z or From A to B.
I found that If the range is A to C , the SP runs fine , if the range is A
to Z , I will got Timeout Expired error,
If I run the SP in SQL analyzer, everyting go fines.
Does the error belong to vb.net ?

Dim cmd As New SqlClient.SqlCommand
cmd.Connection = conSea
cmd.CommandText = "dbo.sel_cs_company"
cmd.CommandType = CommandType.StoredProcedure
cmd.Parameters.Add(New SqlParameter("@reportid",
SqlDbType.VarChar, 20)).Value = Me.pReportId

cmd.ExecuteNonQuery()
cmd.Parameters.Clear()
cmd.Dispose()

--
Thanks !

--
.

Nov 21 '05 #3
I just set commandTimeout = 0 , and there is no error anymore

--
..
"Cor Ligthert" <no************@planet.nl> ¦b¶l¥ó
news:eK****************@TK2MSFTNGP15.phx.gbl ¤¤¼¶¼g...
Agnes,

In this code is not much VBNet except that you uses "dim" furter it is exact the same as C# without row end stuff.

You can use the
cmd.CommandTimeout = 160

However when it stays I would ask it in the newsgroup
Adonet
news://msnews.microsoft.com/microsof...amework.adonet

Web interface:
http://communities2.microsoft.com/co...amework.adonet
I hope this helps?

Cor

"Agnes" <ag***@dynamictech.com.hk>
I am using vb.net to process a SP
The sp are insert XXX select () statment, there are two parameters , Start Company code and End Company Code,
The user input the range From A to Z or From A to B.
I found that If the range is A to C , the SP runs fine , if the range is A to Z , I will got Timeout Expired error,
If I run the SP in SQL analyzer, everyting go fines.
Does the error belong to vb.net ?

Dim cmd As New SqlClient.SqlCommand
cmd.Connection = conSea
cmd.CommandText = "dbo.sel_cs_company"
cmd.CommandType = CommandType.StoredProcedure
cmd.Parameters.Add(New SqlParameter("@reportid",
SqlDbType.VarChar, 20)).Value = Me.pReportId

cmd.ExecuteNonQuery()
cmd.Parameters.Clear()
cmd.Dispose()

--
Thanks !

--
.


Nov 21 '05 #4
I just set commandTimeout = 0 , and there is no error anymore

--
..
"Cor Ligthert" <no************@planet.nl> ¦b¶l¥ó
news:eK****************@TK2MSFTNGP15.phx.gbl ¤¤¼¶¼g...
Agnes,

In this code is not much VBNet except that you uses "dim" furter it is exact the same as C# without row end stuff.

You can use the
cmd.CommandTimeout = 160

However when it stays I would ask it in the newsgroup
Adonet
news://msnews.microsoft.com/microsof...amework.adonet

Web interface:
http://communities2.microsoft.com/co...amework.adonet
I hope this helps?

Cor

"Agnes" <ag***@dynamictech.com.hk>
I am using vb.net to process a SP
The sp are insert XXX select () statment, there are two parameters , Start Company code and End Company Code,
The user input the range From A to Z or From A to B.
I found that If the range is A to C , the SP runs fine , if the range is A to Z , I will got Timeout Expired error,
If I run the SP in SQL analyzer, everyting go fines.
Does the error belong to vb.net ?

Dim cmd As New SqlClient.SqlCommand
cmd.Connection = conSea
cmd.CommandText = "dbo.sel_cs_company"
cmd.CommandType = CommandType.StoredProcedure
cmd.Parameters.Add(New SqlParameter("@reportid",
SqlDbType.VarChar, 20)).Value = Me.pReportId

cmd.ExecuteNonQuery()
cmd.Parameters.Clear()
cmd.Dispose()

--
Thanks !

--
.


Nov 21 '05 #5
Agnes,

Than you can probably as well delete your database without that you get an
error.
From the page about that property

A value of 0 indicates no limit, and should be avoided in a CommandTimeout
because an attempt to execute a command will wait indefinitely.

I hope this helps?

Cor

"Agnes" <ag***@dynamictech.com.hk>
..
I just set commandTimeout = 0 , and there is no error anymore

--
.
"Cor Ligthert" <no************@planet.nl> ¦b¶l¥ó
news:eK****************@TK2MSFTNGP15.phx.gbl ¤¤¼¶¼g...
Agnes,

In this code is not much VBNet except that you uses "dim" furter it is

exact
the same as C# without row end stuff.

You can use the
cmd.CommandTimeout = 160

However when it stays I would ask it in the newsgroup
Adonet
news://msnews.microsoft.com/microsof...amework.adonet

Web interface:

http://communities2.microsoft.com/co...amework.adonet

I hope this helps?

Cor

"Agnes" <ag***@dynamictech.com.hk>
>I am using vb.net to process a SP
> The sp are insert XXX select () statment, there are two parameters , Start > Company code and End Company Code,
> The user input the range From A to Z or From A to B.
> I found that If the range is A to C , the SP runs fine , if the range
> is A > to Z , I will got Timeout Expired error,
> If I run the SP in SQL analyzer, everyting go fines.
> Does the error belong to vb.net ?
>
> Dim cmd As New SqlClient.SqlCommand
> cmd.Connection = conSea
> cmd.CommandText = "dbo.sel_cs_company"
> cmd.CommandType = CommandType.StoredProcedure
> cmd.Parameters.Add(New SqlParameter("@reportid",
> SqlDbType.VarChar, 20)).Value = Me.pReportId
>
> cmd.ExecuteNonQuery()
> cmd.Parameters.Clear()
> cmd.Dispose()
>
> --
> Thanks !
>
> --
> .
>
>



Nov 21 '05 #6
Agnes,

Than you can probably as well delete your database without that you get an
error.
From the page about that property

A value of 0 indicates no limit, and should be avoided in a CommandTimeout
because an attempt to execute a command will wait indefinitely.

I hope this helps?

Cor

"Agnes" <ag***@dynamictech.com.hk>
..
I just set commandTimeout = 0 , and there is no error anymore

--
.
"Cor Ligthert" <no************@planet.nl> ¦b¶l¥ó
news:eK****************@TK2MSFTNGP15.phx.gbl ¤¤¼¶¼g...
Agnes,

In this code is not much VBNet except that you uses "dim" furter it is

exact
the same as C# without row end stuff.

You can use the
cmd.CommandTimeout = 160

However when it stays I would ask it in the newsgroup
Adonet
news://msnews.microsoft.com/microsof...amework.adonet

Web interface:

http://communities2.microsoft.com/co...amework.adonet

I hope this helps?

Cor

"Agnes" <ag***@dynamictech.com.hk>
>I am using vb.net to process a SP
> The sp are insert XXX select () statment, there are two parameters , Start > Company code and End Company Code,
> The user input the range From A to Z or From A to B.
> I found that If the range is A to C , the SP runs fine , if the range
> is A > to Z , I will got Timeout Expired error,
> If I run the SP in SQL analyzer, everyting go fines.
> Does the error belong to vb.net ?
>
> Dim cmd As New SqlClient.SqlCommand
> cmd.Connection = conSea
> cmd.CommandText = "dbo.sel_cs_company"
> cmd.CommandType = CommandType.StoredProcedure
> cmd.Parameters.Add(New SqlParameter("@reportid",
> SqlDbType.VarChar, 20)).Value = Me.pReportId
>
> cmd.ExecuteNonQuery()
> cmd.Parameters.Clear()
> cmd.Dispose()
>
> --
> Thanks !
>
> --
> .
>
>



Nov 21 '05 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Silvia | last post by:
I have a application web and when execute this for a long time generated this error: Server Error in '/RAIMServer' Application. -----------------------------------------------------------...
5
by: Jason | last post by:
Hi all I get the following error when executing a rather intense stored procedure from an ASPX page. I have tried: - Increasing timeouts on IIS 5.0 (all areas that even mention timeout) - use...
2
by: Chris Langston | last post by:
I have a Web Server running IIS 5 or 6 on Windows 2K and Windows 2003 Server that is experiencing strange shutdown problems. We are using ASP.NET v1.1 and our application is written in VB.NET ...
4
by: Nick | last post by:
Hi I am a little stuck. I have a web app which uses cookieless session management. I would like to inform a user when their session has ended but cannot work out how to implement. I thought...
3
by: Nils Magnus Englund | last post by:
Hi, I've made a HttpModule which deals with user authentication. On the first request in a users session, it fetches data from a SQL Server using the following code: using (SqlConnection...
4
by: VB Programmer | last post by:
When I run my ASP.NET 2.0 web app on my dev machine it works perfect. When I precomile it to my web deployment project and then copy the debug files to my web server I get this problem when trying...
0
by: bonita | last post by:
If I add the code for user to download the file (e.g. if(File.Exists(FILE_NAME)){......}), the ASP.NET will give the following timeout error: Timeout expired. The timeout period elapsed prior to...
1
by: Ron | last post by:
Hi, I had a stored procedure on SQL 2000 server to run calculation with large amount of data. When I called this stored procedure via System.Data.SqlClient.SqlCommand on production, i got error...
3
by: rn5a | last post by:
I am working on Win2K Pro (SP4) with P4 2.80GHz, 256MB RAM & 20GB hard disk (IIS5.0). I use Visual Web Developer 2005 Express Edition to create & edit ASP.NET apps. Whenever I log in to my m/c....
1
by: Scorpion657 | last post by:
Hey I really need help. I have a Website coded using ASP.NET and VB and for some reason, i'm getting the following error when I try to upload or access a large file which is stored in the...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.