cancel
Showing results for 
Search instead for 
Did you mean: 

Attempting to read past stream EOM

Former Member
0 Kudos

Hi!

I am developing an asp.net mvc application that connects to Sybase. I am using the driver Sybase.AdoNet4.AseClient.dll version 4.157.1330.0

Sometimes  when i execute an select query using AseCommand, Sybase throws the following exception:

"Attempting to read past stream EOM"

If I execute same query on the InteractiveSQL it works perfectly.

Any solution?

Thanks,

Raúl

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

Thanks Jean and Dawn,

I'm looking for the SDK 15.7 SP137 on the sap web and I can't find it. Someone can tell me the link?

This is the code Jean-Pierre:

-------------------------------------

sql = @"SELECT TOP 3 ...... FROM ..... JOIN .... JOIN .... WHERE ....";

AseCommand cmd = new AseCommand(sql, _cn);

cmd.Parameters.Add("@parameter", AseDbType.Char).Value = "parameterValue";

DataSet ds = new DataSet();

AseDataAdapter da = new AseDataAdapter(cmd);

da.Fill(ds);  //In this line sometimes throws the exception "Attempting to read past stream EOM"

-------------------------------------

It  is a very easy sql with two joins between tables.

Thanks

Raúl.

dawn_kim
Contributor
0 Kudos

Hi,

If it happens only sometimes. When it does happen are you passing specific data in the char field that might not be part of the ASE charset? If older windows box with older studio it will use cp850 charset. With the new .net it usually defaults to Unicode charset. What if you add the following to the connection string: CHARSET=utf8 or whatever your ASE is set to.

Thanks,
Dawn Kim

Former Member
0 Kudos

Greetings,

If this happens SOMETIMES, perhaps it is not a driver issue but, a configuration issue. Can you please send the command you are trying to execute?

Thank you.

Jean-Pierre

dawn_kim
Contributor
0 Kudos

Hi,

If I remember right there was a bug in the ado.net driver: CR 786570 - select with where clause without match and compute clause fails with EOM. Fixed in SDK 15.7 SP137 which dropped Monday, June 13th, 2016.

Thanks,
Dawn Kim