No process is on the other end of the pipe with DateTime.MinValue

Posts   
 
    
gabrielk avatar
gabrielk
User
Posts: 231
Joined: 01-Feb-2005
# Posted on: 03-Nov-2009 10:10:44   

Hi,

I'm having a very strange issue of which I just wanted to report.

I've got a simple (I would think) .GetMulti(filter, 0, sort) call which throws this error:

A transport-level error has occurred when sending the request to the server. (provider: Shared Memory Provider, error: 0 - No process is on the other end of the pipe.)

When I leave out 1 element of the PredicateExpression:

filter.Add(GasTakeLinkContractFields.StartDate == startDate);
filter.Add(GasTakeLinkContractFields.EndDate == endDate);

it won't throw that error. The 'special' thing about this part of the predicate was that the startDate en endDate variables were assigned with DateTime.MinValue. Normally I would expect to get the "SqlDateTime overflow. Must be between 1/1/1753 12:00:00 AM and 12/31/9999 11:59:59 PM." error. But now I got this non descriptive error.

Any suggestions? Is this an LLBLGen issue or SQL server issue?

When I used SQL Server Profiler I got the following 2 results:

When I use DateTime.Now as the filter values I get this:

exec sp_reset_connection 
go
exec sp_executesql N'SELECT [NifeCrm].[dbo].[GasTakeLinkContract].[GasTakeLinkContractId], [NifeCrm].[dbo].[GasTakeLinkContract].[GasTakeLinkId], [NifeCrm].[dbo].[GasTakeLinkContract].[SupplierId], [NifeCrm].[dbo].[GasTakeLinkContract].[CustomerNumberAtSupplier], 
[NifeCrm].[dbo].[GasTakeLinkContract].[GasTakeLinkContractPoolParentId], [NifeCrm].[dbo].[GasTakeLinkContract].[PoolContractType], [NifeCrm].[dbo].[GasTakeLinkContract].[Number], [NifeCrm].[dbo].[GasTakeLinkContract].[StartYear] AS [XStartYear], 
[NifeCrm].[dbo].[GasTakeLinkContract].[StartMonth] AS [XStartMonth], [NifeCrm].[dbo].[GasTakeLinkContract].[EndYear] AS [XEndYear], [NifeCrm].[dbo].[GasTakeLinkContract].[EndMonth] AS [XEndMonth], [NifeCrm].[dbo].[GasTakeLinkContract].[StartDate], 
[NifeCrm].[dbo].[GasTakeLinkContract].[EndDate], [NifeCrm].[dbo].[GasTakeLinkContract].[HourCapacity], [NifeCrm].[dbo].[GasTakeLinkContract].[HourCapacityNotes], [NifeCrm].[dbo].[GasTakeLinkContract].[HourCapacityReportedToNetOperator], 
[NifeCrm].[dbo].[GasTakeLinkContract].[ExtraCapacity], [NifeCrm].[dbo].[GasTakeLinkContract].[ExtraCapacityNotes], [NifeCrm].[dbo].[GasTakeLinkContract].[ProjectedYearVolume], [NifeCrm].[dbo].[GasTakeLinkContract].[ProjectedYearVolumeUnknown], 
[NifeCrm].[dbo].[GasTakeLinkContract].[SteamingTypeId], [NifeCrm].[dbo].[GasTakeLinkContract].[SteamingNotes], [NifeCrm].[dbo].[GasTakeLinkContract].[SteamingDays], [NifeCrm].[dbo].[GasTakeLinkContract].[PriceStandard], 
[NifeCrm].[dbo].[GasTakeLinkContract].[PriceLow], [NifeCrm].[dbo].[GasTakeLinkContract].[PortalLogin], [NifeCrm].[dbo].[GasTakeLinkContract].[PortalPassword], [NifeCrm].[dbo].[GasTakeLinkContract].[Notes], 
[NifeCrm].[dbo].[GasTakeLinkContract].[TuindersverklaringDienstleveringenDoorNife], [NifeCrm].[dbo].[GasTakeLinkContract].[TuindersverklaringDienstleveringenNaam], [NifeCrm].[dbo].[GasTakeLinkContract].[TuindersverklaringDienstleveringenNummer], 
[NifeCrm].[dbo].[GasTakeLinkContract].[TuindersverklaringDienstleveringen], [NifeCrm].[dbo].[GasTakeLinkContract].[TuindersverklaringLeverancierDoorNife], [NifeCrm].[dbo].[GasTakeLinkContract].[TuindersverklaringLeverancier], [NifeCrm].[dbo].[GasTakeLinkContract].[WkkVerklaring], [NifeCrm].[dbo].[GasTakeLinkContract].[WkkPercentage], [NifeCrm].[dbo].[GasTakeLinkContract].[ContractReceived], [NifeCrm].[dbo].[GasTakeLinkContract].[ContractForwarded], [NifeCrm].[dbo].[GasTakeLinkContract].[CancellingRequired], [NifeCrm].[dbo].[GasTakeLinkContract].[CancelledByEmployeeId], [NifeCrm].[dbo].[GasTakeLinkContract].[Cancelled], [NifeCrm].[dbo].[GasTakeLinkContract].[ServiceCosts], [NifeCrm].[dbo].[GasTakeLinkContract].[ServiceCostsDiscount], [NifeCrm].[dbo].[GasTakeLinkContract].[ServiceCostsNotes], [NifeCrm].[dbo].[GasTakeLinkContract].[ServiceCostsDiscountNotes], [NifeCrm].[dbo].[GasTakeLinkContract].[BandwidthCommodityPrice], [NifeCrm].[dbo].[GasTakeLinkContract].[BandwidthServiceCosts], [NifeCrm].[dbo].[GasTakeLinkContract].[Archived], [NifeCrm].[dbo].[GasTakeLinkContract].[Created], [NifeCrm].[dbo].[GasTakeLinkContract].[CreatedBy], [NifeCrm].[dbo].[GasTakeLinkContract].[Updated], [NifeCrm].[dbo].[GasTakeLinkContract].[UpdatedBy], [NifeCrm].[dbo].[GasTakeLinkContract].[Deleted] FROM [NifeCrm].[dbo].[GasTakeLinkContract]  WHERE ( ( ( [NifeCrm].[dbo].[GasTakeLinkContract].[PoolContractType] = @PoolContractType1 OR [NifeCrm].[dbo].[GasTakeLinkContract].[PoolContractType] = @PoolContractType2) AND ( [NifeCrm].[dbo].[GasTakeLinkContract].[StartDate] = @StartDate3 AND [NifeCrm].[dbo].[GasTakeLinkContract].[EndDate] = @EndDate4))) ORDER BY [NifeCrm].[dbo].[GasTakeLinkContract].[Number] ASC',N'@PoolContractType1 int,@PoolContractType2 int,@StartDate3 datetime,@EndDate4 datetime',@PoolContractType1=200,@PoolContractType2=300,@StartDate3='2009-11-03 10:07:55.1330000',@EndDate4='2009-11-03 10:07:55.1330000'
go

When I use DateTime.MinValue's it got this:

RPC:Completed   exec sp_reset_connection    .Net SqlClient Data Provider    NETWORK SERVICE NT AUTHORITY\NETWORK SERVICE    0   0   0   0   5888    52  2009-11-03 10:09:46.547 2009-11-03 10:09:46.547 0X00000000000000002600730070005F00720065007300650074005F0063006F006E006E0065006300740069006F006E00  

No query seems to get submitted to the SQL Server.

Any input on this?

Thanks, Gab

Updated: correct DateTime error for SQL

Walaa avatar
Walaa
Support Team
Posts: 14946
Joined: 21-Aug-2005
# Posted on: 03-Nov-2009 12:13:25   

I would have expected an overflow exception too. But it looks like SQL Server is terminating the connection on it.

Which version of SQL Server are you using? (any SPs installed)?

I found the following while googling:

Possible Solutions: * Install latest updates for OS as well as SQL Server 2005 after install the SQL 2005 sp2. * install latest hot fixes for SQL Server 2005. * some times this problem for SQL Native Client, possible re-install the SQL Native Client. * repair the .NET framework 2.0 with sp's.

Also check the below links:

http://support.microsoft.com/kb/942861 http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=1628211&SiteID=1 http://support.microsoft.com/kb/925843 - for Hot fixes

MSDN Blog link

gabrielk avatar
gabrielk
User
Posts: 231
Joined: 01-Feb-2005
# Posted on: 03-Nov-2009 17:21:06   

The DateTime.MinValue was a bug in my software, so by solving that it doesn't happen again.

For that reason I won't look any further into this, if someone feels the urge to do so it might clarify the exact problem.