I encouter problem with my application when it turn in PC running other application using same BDE as my application , my application can't store record in database in this case, is thre any configuration to make in BDE resolving this problem .
If you operating system is XP or Win7 try editing the BDE settings in BDE administrator in the control panel (backup you idapi.cfg first, of course!). Under configuration|system|init change the sharedmemlocation to 6BDE. Restart your computer.
This will allow BDE to be called by mulitple programs. It may allow the two programs to use the BDE.
Related
In the past, I have worked a lot with Delphi 7. I have two questions for Delphi 10.3:
Does the Interbase DB file have the extension .IB or .GDB, as in the past?
After having created a database with IBConsole, after having entered the DatabaseName property of the TIBDatabase component, I am never able to connect, I always receive the error "Unavailable Database". This also happens to me with the Delphi examples. I don't know what to think, maybe the problem is due to 32bit vs64bit of the system?
InterBase definitely works in 10.3
Regarding File Extension for InterBase.
You can name the file anything you want! InterBase use to use .gdb as the file extension, then Windows started using it for some files causing the OS to try and back those files up before use, and as you can imagine with large databases, that was a pain! So InterBase swapped to .ib as the default extension to avoid that issue.
Which version of Interbase are you using? Hopefully, the latest that comes with the product. It's unlikely to be a 32bit / 64bit issue. InterBase clients can connect to any InterBase server as it uses an over the wire protocol, separate to the OS version. You could be connecting to Linux from Windows, it really doesn't care.
The problem is likely to be InterBase isn't running, or the pathing is incorrect.
If you can connect in IBConsole, then you will be able to connect inside the IDE.
For the database name, just put in the local file path.
Depending on the settings, you might want to put in the full path including IP / server name e.g.
127.0.0.1:c:\mydatafolder\mydatabase.ib
InterBase uses server name or IP, a colon (as the separator) and then the file path on the machine indicated.
If you find you can't connect in IBConsole, restart InterBase using IB Server Manager.
If you are using an OLD version of InterBase, you can download the latest from inside RAD Studio by using Tools > Manage Platforms > Additional Options and selecting the developer edition from the list of options.
I wanted to use the Desktop version of IB XE7 in my development environment but can't get the connection to work.
The original app had used a full server version of IB and I now wanted to run the app on a lower cost single PC type application and selected the IB Desktop version.
The Rad Studio 10.1 Berlin is running on a W7 64bit Virtual machine.
FireDac is the database connection component.
IB XE7 Desktop is the database server on the development PC.
Target for the application is a VM with W7 32bit, with another IB XE7 Desktop on that VM.
I can build the 32 bit app and it will connect to the IB XE7 Desktop on the target PC (running W7 32bit in a VM) after changing the FireDac connection component protocol field to 'local' instead of TCP/IP, something I read in Stack Overflow.
What I can't get to work is the database connection in the development environment.
I first installed the 64 bit version of IB, then removed it and tried the 32 bit version with the same result.
After reading up on some connection problems online, I tried putting 'gds_db' and 'localhost/gds_db' in the server name field, but it still didn't work, although it did change the error.
Error - with nothing in the server name
[FireDAC][Phys][IB]unavailable database.
Error after putting 'gds_db' in the server name
[FireDAC][Phys][IB]Unable to complete network request to host "gds_db".
Failed to locate host machine.
The specified name was not found in the hosts file or Domain Name Services..
First tried 64 bit IB installed, then removed all gsd files found and then the Registry entries, and installed the 32bit version. Problem still persisted.
Note: Database Workbench 5 connects OK to the database on the same VM.
Any ideas welcome.
Thanks.
James F.
I remember it being quite a performance to get Delphi XE8 + Seattle working with IB XE7,
in particular I kept getting the "unavailable database" error when trying to connect from
inside the IDE. Note: the following are things I found necessary to get Delphi working with a local instance of the full IB XE7 package. Requirements for the Developer and Desktop editions very probably differ, hopefully in ways explained in their documentation.
Some of the things to check are:
Check in the Windows Services app that the server is running.
My server shows up as
Interbase XE7 Server gds_db
As you can see, the Services app should tell you the name of the server.
If you want to connect to it via TPC/IP check that you have an entry
in your \windows\system32\drivers\etc\service file like this
gds_db 3050/tcp # InterBase Server
Hash-sign developer_ibxe7 3054/tcp # InterBase Server
The line containing developer_ibxe7 should start with a #, but SO won't display that for some reason. Anyway, that line is commented out because it refers to a developer edition I installed at some point.
Check that your OS environment contains an entry like this one
INTERBASE=d:\ibxe7
If it isn't, add it and reboot the machine.
In my case, d:\ibxe7 is the top-level folder in which I have IB XE7 installed.
With those things set up/checked start a new Delphi project in the IDE, add an IBConnection to it, and set its DatabaseName to a local IB database. For me, specifying
LocalHost:D:\Delphi\Interbase\Databases\MA.GDB
works fine. Then, see if you can set the Connected property to True. If you can't,
leave a comment and I'll see what else I can remember.
The background to this query was this question.
I have installed this driver for Firebird and placed it within the path (system32) used by the IDE. The XE Data Explorer recognises the driver, and it is possible to create a connection using the Data Explorer. Trying to view tables or any other database element through this connection results in the error described in this question. As far as I can see #Alejandro Jourdan has not obtained a solution to this problem, and I can find no solution on any of the support sites for Firebird or for Delphi XE.
The second problem comes when I create a TSQLConnection using this connection. The connection works to the extent that it generates the login prompt to the database, but when it tries to open the connection I get the error message: 'file is not a valid database' This error message is (sort of) reproducible from within the Data Explorer which gives the following error:
I/O error during "CreateFile(open)" operation for file [database path] Error while trying to open file. Access is denied..
The database is valid and can be opened from the Firebird command line utility, and from a Data Base browser.
Environment:
Machine: Lenovo Thinkpad W510
OS: Windows 7 Ultimate 64bit
Delphi: Embarcadero® RAD Studio XE Professional Version 15.0.3953.35171
Database: W1-V2.5.0.26074 Firebird 2.5 (64 bit)
Also Installed:
Embarcado Borland® Developer Studio 2006 Enterprise Version 10.0.2288.42451 Update 2 (XP Version)
Borland Delphi Version 7 (XP Version)
EDIT:
See my own answer below. This edit has removed extensive detail that proves to be unnecessary in the light of that answer, while retaining the core of the question, and the links contained within it.
The first thing that sticks out to me is that you're using the 64-bit version of Firebird, and that you mentioned it comes with both a 32- and 64-bit driver. Are the DLLs named the same? If so, I suspect that the IDE/OS are trying to load the 64-bit version of the DLL in a 32-bit application, which isn't possible (32-bit apps can't load 64-bit drivers, and vice versa).
Try one of two things:
First, if the DLLs have the same name, rename the 64-bit version temporarily, and restart the IDE. Then try again.
Try installing the 32-bit version of Firebird, even though you're running a 64-bit OS.
The basic question I had (in part I) was:
I want to install a Firebird database
driver, and to have it available
within the Delphi XE IDE. I want the
database driver to be usable on the
same basis as other, supplied database
drivers (eg Interbase, SQL - from
within the Data Explorer in the IDE).
I have obtained an appropriate driver.
After considerable investigation I have found that it is not possible to achieve the integration into the Delphi IDE that I was trying to achieve. This is because the Data Explorer is a .NET application and the available DBExpress drivers (here and here) are just not compatible with .NET. I understand that I can use the drivers by setting up the parameters appropriately, in both the IDE and by programming in the application I am developing.
I have drafted this answer to assist others to avoid this particular blind alley. I am also editing the part II question in order to remove a lot of the detail, that proves to be unnecessary in the light of this answer.
I have a very old application written in delphi 5 running in some customers which uses the BDE. Now some users with Windows Vista and 7, had experimented some problems with the multiuser access. i' think which these problems are related to the location of the net.and .lck files. so the question is which is the proper way to confgure the BDE under Windows Vista and 7 to avoid permissions and UAC conflicts?
In addition to the above answer, you'll want to make sure that the .net and .lck files are located in a user-specific directory under Windows 7, specifically:
C:\Users\{User Name}\AppData\Local\{Your Company Name}\{Your Application Name}
Those are the only folders that the current user will always have complete control over.
You can get this folder by using this code:
CSIDL_LOCAL_APPDATA = $001C;
function GetAppDataDirectory: AnsiString;
var
TempBuffer: array[0..MAX_PATH] of AnsiChar;
ResultLength: Integer;
begin
FillChar(TempBuffer,((MAX_PATH+1)*SizeOf(AnsiChar)),0);
ShlObj.SHGetSpecialFolderPathA(0,#TempBuffer,CSIDL_LOCAL_APPDATA,False);
ResultLength:=StrLen(pAnsiChar(#TempBuffer));
SetLength(Result,ResultLength);
Move(TempBuffer[0],pAnsiChar(Result)^,(ResultLength*SizeOf(AnsiChar)));
end;
and then appending {Your Company Name} and {Your Application Name} to the value returned. You'll need to include the ShlObj unit.
One such thing I remember is to configure the Session to put that kind of files on folders where a normal user have write-privileges.
From what I remember, the properties
Session.PrivateDir
Session.NetFileDir
Are the relevant ones.
The correct location will depend on concurrent access, the database you're connecting to, data location –in case of paradox or dbf's– and if you use cached updates or not.
I maintain an application written originally in D4, now compiled with D2007 when rarely needed and it works well on vista+ using this with it's particular configuration and needs (no paradox/dbf's).
If you don't want to work around the security bugs in a default install of the BDE (as other answers mention - granting permissions that the BDE installer forgot to), you can just run your application as an administrator.
You have a few options:
Tell the user to right-click and select Run As Administrator every time.
Go to the program's Compatibility tab, and check Run this program as an administrator (which has the same effect as 1)
Go to the program's Compatibility tab, and Run this program in compatibility mode for Windows XP (which has the same effect as 2)
Create a manifest MyApp.exe.manifest and include the requestedExecutionLevel of requireAdministrator (which has the same effect as 3)
In other words: Your application, as it stands right now, requires administrative access to run - so just run it as an administrator.
On the other hand you can make a few simple changes and your application will no longer need to run as an administrator; you've made the world a better place for all humanity!
I've taken over a legacy application and I have the exe created. If I can configure the BDE then in theory it should be possible to run this. Someone indicated that Delphi needs to be installed in order for the app to run. I'm unsure of that - it doesn't quite make sense to me as there is an exe file. Any input from Delphi experts would be appreciated.
Roddy
If the application uses the BDE then the BDE has to be installed before the exe can run. The BDE files are not linked into the exe.
A Delphi installation normally also installs the BDE. This might give the impression that Delphi has to be installed to run the exe, but that is not true.
According to the deployment licence you have to use something like InstallShield Express that comes with Delphi to create some setup for the BDE, but I might be mislead here. You may even try to google for a BDE installer or have a look at this question.
Your application should work without installting Delphi if it wasn't built to use runtime packages(BPL files).
If it was built to use runtime packages, you'll need to deploy them with your application. Since all delphi's runtime package are installed with Delphi, that may give the impression that installing delphi is required for the application to run, which is not the case.
You might however need to install delphi to retrieve the required BPL files.
BPL files are special DLL files that delphi can refers to instead of linking all code into the .Exe, making EXE files much smaller.
So if you manage to get the BDE up, create the right aliases in it, and get all required BPL(if any), the application should start up correctly.
1 last thing that might need to be deployed with your application is midas.dll. (If the application use, for exemple, Tclientdataset)
That's all I can think of for now...
It seems very awkward to me that Delphi needs to be installed to run your application. Maybe your application is build with runtime packages which means you have to include the bpl's the application depends on, but Delphi itself should not be needed.
You can test this yourself, just run the app on a computer without Delphi installed. When it gives an error about a bpl not found, you have to find that bpl and add it to the directory where your application is located.
Uwe has the answer here. if your application uses any of the data components provided by Delphi it will almost always require the BDE to be installed and other drivers if for example you are talking to Oracle then the Oracle OCI drivers must be installed.
You do not need Delphi to install the BDE but you need to find the BDE installer and have it installed. MANY programs out there use the BDE and not just Delphi since it was licensed by many companies.