cancel
Showing results for 
Search instead for 
Did you mean: 

AseConnection.InfoMessage only called once

Former Member
0 Kudos

In order to notify the user about the progress of a long operation i have set flushmessage on in the beginning of my batch and registered the InfoMessage callback, but it appears to be a design decision to collect all the messages and return them all at the end. So far it appears that I'm stuck with piping the output of isql or digging into the ct-library. Any plans to change this?

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi

We found the same thing a couple of years ago.

To get around this, we downloaded the Mono driver and made slight tweak to it - not difficult - to output the messages immediately.

We now use this for all our batch processes rather than the Sybase ADO drivers.

Mike

Former Member
0 Kudos

Thank you. I shall now embark on a quest to find this driver which apparently was removed from the source tree due to being incompatible with ASE 15, which i don't have anyway because my software vendor refuses to upgrade from ASE 12 because "it works".

Former Member
0 Kudos

See

http://www.mono-project.com/docs/database-access/providers/sybase/

Note: it doesn't support new Sybase 15 features - but we only use Mono for running long running stored procedures. We don't use it for any data transfer between C# and Sybase.

Former Member
0 Kudos

Thank you but this page has no links to the driver itself.

Former Member
0 Kudos

There's a "Download" button on the top of the page - at least I can see one.

Former Member
0 Kudos

I can download Mono by clicking on that, but the driver itself was removed in 2010.

Former Member
Former Member
0 Kudos

Excellent - just checked and the Mono drivers will output the print messages without any changes.

We did however have to make a change to fix a bug.

If you don't want to use the Mono drivers - they try Perl/Sybase or Java (which handles Sybase better than the ADO drivers anyway).

Former Member
0 Kudos

Turns out it was too soon to celebrate. This driver doesn't support any character encoding other than iso_1.

Edit: Nevermind. The connection string parser didn't recognise such a parameter, but otherwise the support is there. Changed one field from private to public, set the charset and it worked.

Former Member
0 Kudos

Okay, after building the driver i finally managed to check and the results were disappointing. It did not deliver the messages when they arrived.

Edit: modified the driver myself. If anyone's interested, it's in Tds.cs on line 1737, add this to the Else block where a message is added to the list:

OnTdsInfoMessage(CreateTdsInfoMessageEvent(messages));

For some reason pasting from clipboard doesn't work on this forum.

Former Member
0 Kudos

Hi,

I thought our version of Mono drivers printed messages as they arrived without any changes.

It was over 2 years since we looked at it but perhaps we edited as well.

Sorry about that.

re: iso_1 - what version of the SDK are you using ? The 12.x SDK didn't support many char sets either.

BTW, If you're using anything before SP125 then you should upgrade. We haven't found any bugs in SP127 and above yet.

Former Member
0 Kudos

I'm using the ASE 16 SDK, downloaded for free from store.sap.com. Was a real pain to download because they weren't sorted by date and the one which appeared to be the latest one gave me a broken download. I also have ASE 12 installed and the charsets folder has 56 subfolders in it versus 57 in the ASE 16 SDK directory, so i don't see any shortage of charsets. Well, it's not like that's important when using the Mono driver because it converts the charsets all on its own.

Former Member
0 Kudos

You could also try the DataDirect drivers from High-Performance ADO.NET Data Providers - DataDirect

I think its all in managed code rather then the Unmanaged code used by Sybase.

https://www.progress.com/net/features/key-features/100-percent-managed-code-wire-protocol

Unfortunately I have no idea how much they charge for using them.

Answers (0)