Here's the situation:
A user of our program suddenly started receiving an error from the Borland Database Engine (BDE) when attempting to start the application. The error message says that it was unable to initialize the BDE and gives error code $251e. User is on BDE 5.2.0.2.
I cannot find any official documentation on the error $251e. The only somewhat useful hit I can get on Google is not very instructive and the suggestion there does no good.
Here are some things that we have tried / discovered:
Other applications that access the BDE the exact same way have no complaints.
The error occurs on a line where we set Connected := True on the TDatabase component.
Reinstalling the BDE makes no difference.
Closing all BDE apps except the one in question makes no difference.
Changing from using an MSSQL database to a Paradox database makes no difference.
Making the logged in user a member of the Administrators group on the workstation makes no difference.
The typically logged in user is a domain user.
Logging in as a workstation administrator (non-domain) account that was originally setup on the machine as a last resort administration account, all works fine.
Creating a new workstation user with local admin rights, the problem returns.
The user has been temporarily allowed to use the one workstation admin account that actually works, but this is not an acceptable long-term solution. Any idea where we might go from here? Any clue as to what $251e really means?
I know that the BDE is way out of date and no longer supported, but changing the use of the BDE is not an option right now.
You might have better luck searching for the error here..
http://www.fulltextsearch.com/
A common culprit seems to be a conflicting device driver.
Good luck
I am not sure, because I don't use BDE for lot's of years, but here are some hints and links:
Error is probably related to BDE parameters (as article you linked claims)
Here are some sites that have some suggestions for optimal BDE configuration
http://www.kennedysoftware.ie/oldapps.htm - check BDE section, have information about BDE configuration and some advices about using BDE with Vista
http://www.thedbcommunity.com/index.php - community site about Paradox and BDE
BDE issues from Codegear quality central
search newsgroup borland.public.bde - there is lots of questions about #251E
Error $251E means "Insufficient shared memory available"
Proposed solutions:
Increase SharedMemSize to 4096 or 8192
Change SharedMemLocation to 0x5BDE.
After using www.fulltextsearch.com to read through hundreds of messages regarding 251e (thanks for the pointer KevinRF), we came up with a list of about a half-dozen new things to try.
Turns out the user had turned on compatibility mode (right-click exe file, choose Properties, Compatibility tab) for the program in question. Turning compatibility mode off for the application resolved the error.
Thanks to all for the suggestions!
Turn off uac and add the setup.exe and regsvr32.exe to DEP.
look on codegear's web site. some time ago i saw an article about the memory layout for this shared memory and ways to resolve a problem like this. it's an ugly business but there was a good article on this. sorry, i can't find it offhand.
Wow, I tried a lot of tactics to try and solve this problem, and it was the same. Compatibility mode. Disabled the compatibility mode and the problem is gone for good.
If your executable is with the tables (same directory), try putting it in another location.
You can also Try to rename the Executable file name, had the same problem, I know it sounds strange but it worked for me.
Looks like the path somehow caused the problem.
I solved it by renaming the folder containing project files.
Related
I found interesting problem with Win7/X64 machine.
For this time I haven't got problem with Delphi 6 and UAC.
The exes are working in their's place, so I can use Delphi debugger with them.
But today I got error on run the project: "Unable to create process. For this operation you need higher user level".
How can I prevent this side-effect?
What causes this?
I don't understand why the older projects are running fine, but this new isn't...
Thanks for every idea, link, information!
Additional info:
Normally I using the Delphi 6 IDE with normal starting (without SysAdmin rigths).
So it is never asking me with "really?" kind UAC questions.
And every of the older projects are usable with Delphi 6 - I can build, run, debug everything.
This problem happened with only this project, so I try to find the differences if possible to solve the problem.
I using normal directory ("c:\dev\anyproject"), others are using "c:\dev\otherproject1..2..n").
Does your application request elevation when started from Windows Explorer?
Does it have a manifest?
The name of the exe, like setup.exe, could also trigger elevation. See an outline of the Installer detection technology.
Non-elevated process can't debug elevated process.
If your application requires elevation at the start, then you would need to run the IDE elevated to be able to debug it.
Starting your IDE as an administrator should solve the problem (option in the context menu).
If not, you could always disable UAC while developing.
There is a number of limitations that needs administrator's rights.
For example: you cannot write data directly into program files directory.
I've set up trial Delphi 2010 for the testing. After some days it is started and freeze. I just can see web-page with "how-to-buy" and at the right side last edited project. But Delphi's window do not react on any mouse events.
I've tried to reinstal and repair it.
So... What I have to do?
May be that project have bad files or some settings of IDE is incorrect?
Do you have any ideas?
Locate the .DSK file for any project it is trying to load, or the default.dsk file and delete it. Often this fixes Delphi startup failures. This file contains the desktop layout and list of open files.
Did you uninstall and resointall?
Did you contact Embarcadero? At this point in any potential business transaction you are at your most powerful. You have not paid, but it looks like you might; surely they would want to help you?
So, why ask us, rather than the company that wants to sell it to you?
Coupled with that - if you ask now you might get a rough idea of how helpful they could potentialy be if you ever do spring US $1k+
Can someone please give me a step by step on how to build an installation disk for my Delphi 2010 application?
I have tried both InstallAware Express Edition which comes with Delphi 2010 but keeps on giving me error message for it continue to look for *120.bpl instead of *140.bpl
I have also tried InnoSetup with ISTool but fail to work, which I believe I am not setting it up properly.... (e.g. failed to include all required packages)
My Apps is a simple database enquiry which I used dbExpress to connect to my ms-sql database.
I have also tried switching the flag in Delphi 2010 for "Built with Packages", no luck also...
Please help....
I am leaning toward using InnoSetup instead, but can someone tell me what is the typical set up is like... much appreciated.
Cheers.
The best place for support on an innosetup script, is the innosetup newsgroups. If you ask your question there, they would want to know more detail about what you are trying to do. Your app is going to set up some database stuff, so a lot more detail is required if you want an answer.
Innosetup is definitely is the easiest and fastest route to a setup.exe, which when placed on a CD, would make an "install CD". (Who uses CDs anymore anyways?)
In Thunderbird/OutlookExpress/WindowsMail, add an nntp server called news.jrsoftware.org,
and subscribe to the newsgroup "Jrsoftware.innosetup.code" and "jrsoftware.innosetup", and ask your question. Post your script. Show your error messages. Explain your database configuration strings, and how you are installing any dbExpress runtime components, if any apply to your application.
dbexpress in Delphi 2010 don't need nothing to be registered when deployed.
You simply need to create a folder with:
your executable.
all the required packages.
libmysql.dll
dbxmys.dll
midas.dll (if you are not using midaslib in your uses clause)
This is a easy work for an installer.
We've used Wise Installation for many years. Very easy to build install scripts. Works great.
I'm pretty much at my wits end at the moment.
I am using Delphi 2009 (Update 3) on Vista (service pack 2) and without fail, if integrated debugging is enabled and I try to run a project, it will give an access violation and the project will crash out.
This happens even if I haven't even added any code to the default project template.
The only way I get around this is by disabling the integrated debugger, (then I may as well just be using a text editor and a command line compiler...)
Does anyone have any advice for this? I've been googling without much success.
Thanks in advance.
I have used this combination without any problem.
Have you tried at at a clean machine (just installing delphi and try a "hello world" application?
Go to Project > Options, Compiler tab. Uncheck Optimization, check stack frames. This seems to be the usual advice in the faqs on Delphi debugging. It may only apply to the earlier versions of Delphi but is worth trying.
I'm having an interesting problem implementing a global keyboard hook.
I wrote a dll which is used to set the hook and then an application (Delphi) which loads the dll and processes the results of the hook. This was done this afternoon on my PC at work and after some testing I figured it was working 100%.
I've just tested the same app and dll here at home and I'm not getting any errors, but the application does not appear to be getting any data either.
Both machines are WinXP, although my work machine is SP2 and this one is SP3.
Has there been some change in the Win32 API which would cause this to malfunction, or could the problem be related to some A/V / Spyware / MS Update that has been released recently?
I'm hoping somebody here will know of an obvious reason that this may happen before I spend hours debugging.
Thanks!
Actually some A/Vs don't like homemade hooks. I've got the same problem with my mouse hooker on some machines, and it doesn't depend on service pack version.
Yeah, I could. I haven't installed Delphi on this machine, but I think I might have to. I'm going for the low hanging fruit here. If there's an obvious answer, there's no need to go through all the trouble of debugging and hoping to find what might be the problem.
My first suspicion is that there's been a change in the API somewhere.
As I mentioned, this app works absolutely perfectly on my work machine.
Do you have a debugger on your home computer? Do you receive any messages via the hook at all?
Can it be that some other application is hooking, and don't pass the message on down the hook-chain?
BTW: I love virtual machines for this kind of testing. Keep a clean XP install. Install SP2, and test your application. Roll back to clean install again, and install SP3. Try your application again. This way you will know if its SP3, since there is nothing else to mess things up. I like to keep a set of snapshots around with different configurations.
Which kind of hook are you using? I once used the WH_CBT-type and encountered problems when certain other applications where running. One case I could trace back to Trillian, which seems to do also some kind of hooking (and maybe screws up).
Apart from that I am currently working on an application that uses the WH_KEYBOARD-hook and this works on SP2 and SP3 equally well. The MSDN also doesn't mention any service-pack related changes.
What you can do to trace the bug on your home machine:
make sure to check all result values of all system api calls (and use GetLastError in case of error)
provide some kind of debug output in case of error (e.g. as message box or to a text file)
optional: log some status messages so you know whats going on internally
One alternative is to use a low level keyboardhook. (Just a different param to SetWindowsHookEx). The hook is processed in the message loop of the registering thread, and thus does not need to inject a dll everywhere. And for some odd reason VirusScanners/Firewalls interfere much less with it. They often silently block dllinjection or normal keyboardhooks. Also removes the need to share the hHook across processes if you want it to work in older windows versions.
And if you abuse a keyboardhook to implement global hotkeys(Have seen that a lot) use RegisterHotkey/http://msdn.microsoft.com/en-us/library/ms646309.aspx) instead.