473,326 Members | 2,337 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,326 software developers and data experts.

Timeout

I am setting the source of a crystal report and sometimes get a Timeout
error.
How can I increase the timeout?
It seems to timeout after 30 seconds.

Here is a snippet of the code that I use.
Using VB 2005

Dim oRpt As New ReportDocument
Dim strConnectionString As String = "Data Source=Server1;Initial
Catalog=Database1;Persist Security Info=True;User ID=test;Password=password"
Dim conn As New SqlConnection(strConnectionString)
Dim strSQL as String = "SELECT * FROM Table1"

Dim DS As New Data.DataSet
Dim DA As New SqlDataAdapter(strSQL, conn)

DA.Fill(DS)

oRpt.Load(Application.StartupPath.ToString &
"\Reports\pc_detail_employee.rpt")
oRpt.SetDataSource(DS.Tables(0))

Thanks,
Lou
Apr 19 '06 #1
3 2949
Add Connection Timeout = Whatever at the end of the connection string.
"Lou Civitella" <lo*@webersystems.com> wrote in message
news:%2****************@TK2MSFTNGP03.phx.gbl...
I am setting the source of a crystal report and sometimes get a Timeout
error.
How can I increase the timeout?
It seems to timeout after 30 seconds.

Here is a snippet of the code that I use.
Using VB 2005

Dim oRpt As New ReportDocument
Dim strConnectionString As String = "Data Source=Server1;Initial
Catalog=Database1;Persist Security Info=True;User
ID=test;Password=password"
Dim conn As New SqlConnection(strConnectionString)
Dim strSQL as String = "SELECT * FROM Table1"

Dim DS As New Data.DataSet
Dim DA As New SqlDataAdapter(strSQL, conn)

DA.Fill(DS)

oRpt.Load(Application.StartupPath.ToString &
"\Reports\pc_detail_employee.rpt")
oRpt.SetDataSource(DS.Tables(0))

Thanks,
Lou

Apr 19 '06 #2
Before the fill, do:

DA.SelectCommand.CommandTimeout = ??

Replace the '??' with whatever value you feel is appropriate. You can use 0
for an infinite timeout.

"Lou Civitella" <lo*@webersystems.com> wrote in message
news:%2****************@TK2MSFTNGP03.phx.gbl...
I am setting the source of a crystal report and sometimes get a Timeout
error.
How can I increase the timeout?
It seems to timeout after 30 seconds.

Here is a snippet of the code that I use.
Using VB 2005

Dim oRpt As New ReportDocument
Dim strConnectionString As String = "Data Source=Server1;Initial
Catalog=Database1;Persist Security Info=True;User
ID=test;Password=password"
Dim conn As New SqlConnection(strConnectionString)
Dim strSQL as String = "SELECT * FROM Table1"

Dim DS As New Data.DataSet
Dim DA As New SqlDataAdapter(strSQL, conn)

DA.Fill(DS)

oRpt.Load(Application.StartupPath.ToString &
"\Reports\pc_detail_employee.rpt")
oRpt.SetDataSource(DS.Tables(0))

Thanks,
Lou

Apr 19 '06 #3
> Add Connection Timeout = Whatever at the end of the connection string.

As long as it is a value and more than 0 'or you would like rusian roulette

http://msdn2.microsoft.com/en-us/lib...ontimeout.aspx

Cor
Apr 19 '06 #4

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

Similar topics

9
by: E Sullivan | last post by:
I am having a time out issue when multiple users are accessing the server. This time out does not happen all of the time. My understanding is that the time out value is actually set in two places....
12
by: Geigho | last post by:
Setting session timeout in web.config file does not seem to have any effect. Any explanation or suggestion will be appreciated.
2
by: Greg Decos | last post by:
I am using forms authentication using a FormsAuthenticationTickets set to expire in 30 minutes and the ticket is added to the collection of cookies. I am not sure where the following values are...
4
by: DavidS | last post by:
First: There are several ways to confuse one regarding session timeout. (1) web.config - <sessionState timeout="20"> (2) IIS Manager | Internet Information Services | ServerNode | Default Web Site...
17
by: jensen bredal | last post by:
Hello, i'm struggling with a somehow badly understood session scenario. I provide acces to my pages based on form authentication using Session cookies. Som of my pages are supposed to be...
4
by: UJ | last post by:
I have a page where the user can upload a video file. As you can guess, this may take a while. Is there a way I can change the session timeout for just this one page? I would also want to change...
22
by: Nick Craig-Wood | last post by:
Did anyone write a contextmanager implementing a timeout for python2.5? I'd love to be able to write something like with timeout(5.0) as exceeded: some_long_running_stuff() if exceeded:...
25
by: =?Utf-8?B?RGF2aWQgVGhpZWxlbg==?= | last post by:
I tried: <sessionState timeout="1"> </sessionState> bounced IIS, and after 1 minute still had a session. ??? -- thanks - dave
5
by: Masso | last post by:
Hallo to the group, my question is this: where i have to set timeout in a web application? If i set into sessionState with property Timeout="60", after 20 minutes the session is over. Always...
2
by: JimLad | last post by:
Hi, I've got a very basic asp.net page that accesses a very slow db query and siplays to screen. I'm hitting a timeout aftre about 3.5 to 4.5 minutes - seems to be variable. SQL connection...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

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.