Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Attempted to use catch-all token with token 0 of Undefined length #223

Open
wang249067 opened this issue Mar 25, 2022 · 6 comments
Open

Comments

@wang249067
Copy link

wang249067 commented Mar 25, 2022

AdoNetCore.AseClient nuget 0.19.2

查询表 有varchar 类型 报错 Attempted to use catch-all token with token 0 of Undefined length
去掉varchar 类型字段可以正常查出。

image

@brunosaboia
Copy link

I am also having this issue while trying to run a query.

It works for everything else, except if the field is char. I tried casting it, but no luck so far. Any ideas?

Thanks!

@ThierryLesire
Copy link

Same here with AseCommand
Has anyone a solution?

@ThierryLesire
Copy link

The code:
try
{
con.Open();
AseCommand cmdSql = new AseCommand("select short_name from companies", con);
AseDataReader reader = cmdSql.ExecuteReader();
while (reader.Read())
{
string cpt = reader.GetString(0);
if (liste.Length > 0)
liste += ",";
liste += cpt;
}
}
catch (Exception ex)
{
MessageBox.Show(" Problème d'ouverture de la connexion avec la DB :" + ex.Message);
}

The exception:
Attempted to use catch-all token with token 8 of Undefined length
  | StackTrace | " à AdoNetCore.AseClient.Token.CatchAllToken.CalculateRemainingLength(Stream stream) dans C:\Users\tiennguyen\source\repos\AdoNetCore.AseClient.0.19.2\src\AdoNetCore.AseClient\Token\CatchAllToken.cs :ligne 42\r\n à AdoNetCore.AseClient.Internal.TokenReader.d__0.MoveNext() dans C:\Users\tiennguyen\source\repos\AdoNetCore.AseClient.0.19.2\src\AdoNetCore.AseClient\Internal\TokenReader.cs :ligne 37\r\n à AdoNetCore.AseClient.Internal.InternalConnection.InternalExecuteQueryAsync(AseCommand command, AseTransaction transaction, TaskCompletionSource`1 readerSource, CommandBehavior behavior) dans C:\Users\tiennguyen\source\repos\AdoNetCore.AseClient.0.19.2\src\AdoNetCore.AseClient\Internal\InternalConnection.cs :ligne 342\r\n--- Fin de la trace de la pile à partir de l'emplacement précédent ---\r\n à System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n à AdoNetCore.AseClient.Internal.InternalConnection.ExecuteReader(CommandBehavior behavior, AseCommand command, AseTransaction transaction) dans C:\Users\tiennguyen\source\repos\AdoNetCore.AseClient.0.19.2\src\AdoNetCore.AseClient\Internal\InternalConnection.cs :ligne 474\r\n à AdoNetCore.AseClient.AseCommand.ExecuteReader(CommandBehavior behavior) dans C:\Users\tiennguyen\source\repos\AdoNetCore.AseClient.0.19.2\src\AdoNetCore.AseClient\AseCommand.cs :ligne 165\r\n à AdoNetCore.AseClient.AseCommand.ExecuteReader() dans C:\Users\tiennguyen\source\repos\AdoNetCore.AseClient.0.19.2\src\AdoNetCore.AseClient\AseCommand.cs :ligne 179\r\n à CreationFacture.grpMnt.ListeInstitWiges() dans H:\Projets\PEPPOL\CreationFacture\CreationFacture.cs :ligne 475"

@MrAMY
Copy link

MrAMY commented May 18, 2023

hello, i have same issue, has anyone a solution?

@tiagor87
Copy link

Anyone?

@ThierryLesire
Copy link

I moved away from using this package to take Sap.Data.SQLAnywhere directly.
It works much better

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants