Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Data Bases > Sybase > connection is e...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 1 of 5 Topic 2435 of 2504
Post > Topic >>

connection is expecting a read

by Jorge Reyes <jorg_reyes@[EMAIL PROTECTED] > Apr 3, 2008 at 07:45 PM

Hi everyone i have this issue, i have a stored procedure like this:

SELECT @[EMAIL PROTECTED]
 = (SELECT MAX(CONVERT(INT,Load_Begin))
                              FROM SES
                              WHERE PMM_DATETIME BETWEEN @[EMAIL PROTECTED]
 @[EMAIL PROTECTED]
)
SELECT ISNULL(@[EMAIL PROTECTED]
)
SELECT @[EMAIL PROTECTED]
 = (SELECT MAX(PMM_DATETIME)
			   FROM (
				SELECT  MAX(Load_Begin) AS 'Max_Load_Begin',
					PMM_DATETIME
				FROM (
				    SELECT PMM_DATETIME, MAX(CONVERT(INT,Load_Begin)) AS
'Load_Begin'
				    FROM SES
				    WHERE PMM_DATETIME BETWEEN @[EMAIL PROTECTED]
 AND @[EMAIL PROTECTED]
    GROUP BY PMM_DATETIME
				) A1 ) A2)
SELECT ISNULL(@[EMAIL PROTECTED]
())


so the resul of this is:

100
The SQL Server is terminating this process.

20:09:57.927	DBMS	BIZARRODB -- Error:  Layer (5), Origin (2), Severity
(7), Number (12) ct_send(): network packet layer: internal Client
Library error: State error: trying to write when connection is
expecting a read., Batch -1 Line -1


as you can see the first calcule is good, it return 100, but the
second is the problem, so i put this out of the stored in a isql
console and it returns:

DECLARE @[EMAIL PROTECTED]
 DATETIME
SELECT @[EMAIL PROTECTED]
 = (SELECT MAX(PMM_DATETIME)
                                   FROM (
                                        SELECT  MAX(Load_Begin) AS
'Max_Load_Begin',
                                                PMM_DATETIME
                                        FROM (
                                            SELECT PMM_DATETIME,
MAX(CONVERT(INT,Load_Begin)) AS 'Load_Begin'
                                            FROM SES
                                            WHERE PMM_DATETIME BETWEEN
'2008-01-01 00:00:00' AND '2008-01-01 00:04:59'
                                            GROUP BY PMM_DATETIME
                                        ) A1 ) A2)

SELECT @[EMAIL PROTECTED]
 result:

1 row(s) affected.


[NULL]


so i dont understand why happens this with the sp, help please!!!




 5 Posts in Topic:
connection is expecting a read
Jorge Reyes <jorg_reye  2008-04-03 19:45:27 
Re: connection is expecting a read
Manish Negandhi <negan  2008-04-03 20:39:14 
Re: connection is expecting a read
bret@[EMAIL PROTECTED]   2008-04-04 08:16:44 
Re: connection is expecting a read
Jorge Reyes <jorg_reye  2008-04-04 10:08:31 
Re: connection is expecting a read
Jorge Reyes <jorg_reye  2008-04-04 10:21:25 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan13V112 Fri Jul 4 15:39:36 CDT 2008.