The forum will experience an outage sometime between February 10 at 7:00pm EST and February 12 at 11:59 EST for installation of security updates. The actual time and duration of the outage are unknown but attempts will be made to minimize the downtime. We apologize for any inconvenience.

Someone emailed me this, I've no idea if it's true, belongs here or is of any interest (so I don't mind if it is deleted).

theDdailywtf

asked 15 Nov '10, 14:28

Daz%20Liquid's gravatar image

Daz Liquid
861182338
accept rate: 28%


I can't speak directly to managed code since I've never worked with it; however, generating an exception as appears to be the model sounds like the right thing to do. In the context of unmanaged code (I believe it is the unmanaged dbdata DLL that is dynamically loading the likewise unmanaged dblgen DLL in this case), that message generally represents a mis-installation of the product and the message is very helpful to the developer who sees it. It generally should not be seen in a deployed application but, on the off-chance that the message is displayed in the field -- even for unmanaged apps, then I agree that displaying a message box is not a very embedding-friendly thing to do. A product enhancement request should be made though I'm happy to do so from within Sybase. For what it is worth, until the language DLL is loaded you won't be able to get useful error messages about anything else that goes wrong.

Of course, I can't explain why the DLL wasn't loaded if it was in the current directory and that's the real problem here. We definitely look in the current directory as well as the same directory as the DLL that is doing the loading, the same directory as the executable that is running plus various other directories where the product might be installed as indicated by environment variables and registry settings. Perhaps some crazy restrictions are imposed by the managed environment? If DLLs must be copied into some other directory just to be loaded by managed code then I hope the developers of the driver remembered to copy the DLLs for all of the other languages too. I'll need to check that with them. Perhaps the problem is that the directory containing dblgen DLL isn't actually the current directory as the author claims and since we copied dbdata to a temporary location then we have no idea where to find dblgen unless the environment or registry is configured correctly. If the DLL is correctly installed and can't be loaded then a bug report should made so that tech support can help the developer find out what is going wrong on their system and/or get a fix implemented.

I would also add that displaying message boxes for errors on Windows is quite normal too. The LoadLibrary() call itself defaults to displaying a message box if a library cannot be loaded unless those message boxes are disabled via the SetErrorMode() call. Similarly, a message box is displayed by the OS when an executable or DLL is loaded that has a static reference to another DLL that cannot be found. Perhaps the displaying of the SQLAnywhere message box should be controlled by the current Windows error mode too.

In summary, this is not really a WTF in my books but the behaviour could be improved for embedability and there could be a bug or two lurking in there. A bug report should definitely be made if the developer can't get the language resource DLL to load correctly on a properly installed system.

An open-letter rant, um, constructive criticism isn't the nicest way to get a change request but we're here to help and we'll definitely take good suggestions into consideration however they come to us.

permanent link

answered 15 Nov '10, 17:11

John%20Smirnios's gravatar image

John Smirnios
8.7k377106
accept rate: 40%

4

The issue is not unique to ADO.NET code. Anyone using any of our database interfaces (ODBC, OLE DB, ESQL, etc.) will see the same problem if they forget to deploy the language dll, dblgen12.dll.

I expect the problem is happening because there is a 32-bit/64-bit mismatch happening. We've seen this problem before where someone will develop an ADO.NET application and deploy it and the 32-bit version of the language dll. When installed on a 64-bit machine, however, the managed code will run as 64-bit and require the 64-bit version of the language dll.

(15 Nov '10, 17:55) Bill Hillis
4

I also don't think the message box would be seen, as claimed, when running under a web server. Typically, those run as services and do not (or cannot with Vista or later) interact with the user. The OS doesn't display the message and it doesn't wait for input.

(15 Nov '10, 21:27) John Smirnios

just my 2 pence, but simply asking for something to be fixed rather than having a bit of a rant seems like a much better way of dealing with it. Much like the sybase provider using the full framework instead of the client, simple question on here (I'd include the link but I can't seem to find it doh!) and it was fixed.

(16 Nov '10, 12:25) Daz Liquid

John, I think that you are incorrect about the service situation. When a service encounters this missing SA dll situation, it hangs, and I can only presume it is hung because of the messagebox.

(26 Feb '13, 11:34) Leo Tohill

Hi Leo,

Which EBF version are you running? This issue (Bill's description where we put up a dialog box when we're missing the language DLL in all client interfaces) has been resolved in EBFs already:

CR #651363 (Client Fix): http://search.sybase.com/kbx/changerequests?bug_id=651363 - 12.0.1.3127

CR #651423 (ADO.NET Fix) - http://search.sybase.com/kbx/changerequests?bug_id=651423 - 12.0.1.3128

(26 Feb '13, 12:25) Jeff Albion
More comments hidden
showing 5 of 6 show all flat view

This issue (Bill's description where we put up a dialog box when we're missing the language DLL in all client interfaces) has now been resolved in EBFs:

CR #651363 (Client Fix): http://search.sybase.com/kbx/changerequests?bug_id=651363 - 12.0.1.3127

CR #651423 (ADO.NET Fix) - http://search.sybase.com/kbx/changerequests?bug_id=651423 - 12.0.1.3128

permanent link

answered 26 Feb '13, 12:28

Jeff%20Albion's gravatar image

Jeff Albion
10.7k171174
accept rate: 24%

Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×2

question asked: 15 Nov '10, 14:28

question was seen: 1,430 times

last updated: 26 Feb '13, 12:28