Microsoft SQL Server
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
 
User Name:
Password:
Remember me
Go Back   ASP Free ForumsDatabaseMicrosoft SQL Server

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread ASP Free Forums Sponsor:
  #1  
Old September 24th, 2003, 02:53 PM
mcanty mcanty is offline
Registered User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Sep 2003
Location: Huntington Beach, CA
Posts: 4 mcanty User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Send a message via Yahoo to mcanty
SQL server remote connection error

I am getting this error when I execute a query on a remote server.

[Microsoft][ODBC SQL Server Driver][TCP/IP Sockets]ConnectionCheckForData (CheckforData()).
[Microsoft][ODBC SQL Server Driver][TCP/IP Sockets]General network error. Check your network documentation.

Connection Broken

This only happens when my query is run between these dates

'5/1/2003'
'5/30/2003'

The query returs an extended cost- I have checked the totals for that quarter is over 1900000.00

If I run for the first quarter of this year the total is just under 1800000.00 and it executes fine.

here is my query

SELECT TOP 15 t.description, Amount = CASE WHEN t.Extcost_priceUSD IS NULL THEN 0 ELSE t.Extcost_priceUSD END
FROM (
SELECT DISTINCT a.description, (SELECT sum(d.Extcost_priceUSD)
FROM POS_DataTable d
WHERE d.description = a.description
AND d.ship_date >= '5/1/2003'
AND d.ship_date <= '5/30/2003'
AND d.COID = 100
) as Extcost_priceUSD
FROM POS_Datatable a
WHERE COID = 100
AND ship_date >= '5/1/2003'
AND ship_date <= '5/30/2003'
Group By a.description
) as t
Order by t.Extcost_priceUSD DESC

Can anyone tell me why this happens.

Reply With Quote
  #2  
Old September 27th, 2003, 06:03 PM
dcarva's Avatar
dcarva dcarva is offline
Contributing User
ASP Free Novice (500 - 999 posts)
 
Join Date: Jan 2003
Location: USA
Posts: 633 dcarva User rank is Lance Corporal (50 - 100 Reputation Level)dcarva User rank is Lance Corporal (50 - 100 Reputation Level)dcarva User rank is Lance Corporal (50 - 100 Reputation Level) 
Time spent in forums: 9 h 18 m 20 sec
Reputation Power: 6
That's really strange. Don't know if this will help, but try using BETWEEN to see if you still get the error:

AND ( d.ship_date BETWEEN '5/1/2003'
AND '5/30/2003' )

Reply With Quote
  #3  
Old March 9th, 2004, 05:00 AM
jawee jawee is offline
Registered User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Mar 2004
Posts: 1 jawee User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
i'm experiencing the same problem. the weird thing is, it happens on random tables on the same database and same remote server.

my query is a simple

select count(*) from imgtable where id = 7

Reply With Quote
Reply

Viewing: ASP Free ForumsDatabaseMicrosoft SQL Server > SQL server remote connection error


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 5 hosted by Hostway
Stay green...Green IT