AdoNetCore.AseClient icon indicating copy to clipboard operation
AdoNetCore.AseClient copied to clipboard

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

Open wang249067 opened this issue 3 years ago • 6 comments

AdoNetCore.AseClient nuget 0.19.2

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

image

wang249067 avatar Mar 25 '22 03:03 wang249067

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!

brunosaboia avatar Jun 30 '22 09:06 brunosaboia

Same here with AseCommand Has anyone a solution?

ThierryLesire avatar Feb 16 '23 14:02 ThierryLesire

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.<Read>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"

ThierryLesire avatar Feb 16 '23 14:02 ThierryLesire

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

MrAMY avatar May 18 '23 11:05 MrAMY

Anyone?

tiagor87 avatar Dec 10 '23 00:12 tiagor87

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

ThierryLesire avatar Dec 13 '23 13:12 ThierryLesire