AdoNetCore.AseClient: AseConnection.InfoMessage is currently never triggered
When I issue the following command to an ASE
LOAD DATABASE AZU WITH LISTONLY=LOAD_SQL,UNTIL_TIME='2018-08-16T17:40:23:310'
it returns a SQL script which I could use to restore a database to a particular point in time. The problem is that the response is not a result set or so, but just informational messages.
I subscribed to AseConnection.InfoMessage, but the private AseConnection.NotifyInfoMessage() method is never triggered… The event InfoMessageInternal has a TODO flag 😃.
What would be the best / desired way to implement that functionality? InternalConnection.InternalExecuteAsync() looks like a place where the command.Connection could be passed down to the MessageTokenHandler to fire this event.
About this issue
- Original URL
- State: closed
- Created 6 years ago
- Comments: 19 (7 by maintainers)
the type
AseInfoMessageEventArgshas an interesting interpretation of what it should be doing… it has 2 properties:AseInfoMessageEventArgs.Errorsis nevernull, it may contain 0 results though. It contains all? theTDS_EEDmessages from the response stream in the sequence they arrive.AseInfoMessageEventArgs.Messagealways returns the value ofErrors[0].Messageand thus may potentially throw an index out of bounds error (in practice I don’t think this ever happens because I hope the driver only ever raises the event whenErrorshas at least one element; regardless you should not treat.Messageas a safe property to rely on)My suggestion for the classes would be something like
Our reference driver places all messages inside the
AseInfoMessageEventArgs.Errorsproperty… adapted from my production logging code:outputs multiple lines:
(I am using the 16.0.3.0 driver; to get the latest you are supposed to have your dba log in to their portal and download the sdk)
Right. I just wanted to make sure you don’t mean some other DLL burried deep down in the ase_setup.zip or so 😃