all groups > dotnet datatools > february 2008 >
You're in the

dotnet datatools

group:

Table adapter timeout problme



Table adapter timeout problme lrlebron@gmail.com
2/26/2008 11:57:48 AM
dotnet datatools: I have a table adapter with the following query

SELECT viewCoreCheckIn.TonerTypeKey, viewCoreCheckIn.PartNumber,
viewCoreCheckIn.MinCheckInQty, viewCoreCheckIn.MaxCheckInQty,
viewCoreCheckIn.StagingCurrentQty,
viewCoreCheckIn.PreInventoryQty,
COALESCE (- (viewCoreCheckIn.MinCheckInQty +
viewCoreCheckIn.MinPreInventoryQty +
viewTotalReleasedQtyRemaining.TotalQtyNeeded -
viewCoreCheckIn.StagingCurrentQty
+ viewCoreCheckIn.PreInventoryQty), 0) AS
TotalQtyNeeded,
COALESCE (- (viewCoreCheckIn.MinPreInventoryQty
+ viewTotalReleasedQtyRemaining.TotalQtyNeeded -
viewCoreCheckIn.PreInventoryQty), 0)
AS PreInventoryQtyNeeded
FROM viewCoreCheckIn LEFT OUTER JOIN
viewTotalReleasedQtyRemaining ON
viewCoreCheckIn.TonerTypeKey =
viewTotalReleasedQtyRemaining.TonerTypeKey
WHERE (viewCoreCheckIn.TonerTypeKey = @TonerTypeKey)


If I call the query from code or use preview data on the table
adapter, depending on the @TonerTypeKey the adapter will give me the
following error message

"Timeout expired. The timeout period elapsed prior to completion of
the operation or the server is not responding"

However, if I run the query from Sql Management studio or do Configure
->Query Builder -> Execute Query in the table adapter the query runs
in less than a second.


Any ideas as to what may be going on?


thanks,

RE: Table adapter timeout problme Vinu
5/13/2008 3:28:00 AM
Please try setting the connection timeout property of command object.
Also please verify the below link.

http://forums.asp.net/t/903456.aspx

Regards,
~VInu

[quoted text, click to view]
RE: Table adapter timeout problme Abdul Majid
6/19/2008 4:34:04 AM
Use Partial Classes in VS 2005

e.g.

namespace xxxTableAdapters
{

public partial class xxxxlTableAdapter
{

public int InsertCommandTimeout
{
get
{
return (this.InsertCommandTimeout);
}

set
{
this.InsertCommandTimeout = value;
}
}

public int UpdateCommandTimeout
{

This will give you access to the private timeout properties of the table
adapter in your code and hance set the values...

[quoted text, click to view]
AddThis Social Bookmark Button