|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
Strange embedded Firebird Behaviour
Hi Guys!
Im having some problems redistributing my Application with Firebird Embedded server 1.5.3.4870-0_embed_win32. I made sure to include all the redistributed files with my application, like fbclient(the embedded server itself),firebird.conf & firebird.msg. When i run the application, it does connect to the embedded server.( I have a setting in my app where u can test your connection to a database, gdb or fdb). My problem is: Inside my app i have a main menu, now some of the items inside the menu will open a mdichild form, with a datagrid on it with a list of records for that menu item(Say CUstomer LIst), and then i have some Menu Item who will only open a Modal form on the window to display some settings(like Company information form or the connection settings form). Now when i click the menu item that brings up a modal form, it works fine, i can access the data, and change them, and the changes are reflected to the db. THis shows that the application IS INDEED connected to the embedded server. BUT.... As soon as i click a menu item that opens a MDI Child form(with the datagrid on it) i get the following error: "Access Voilation at address 0214BC2D in module fbclient.dll, and then the application freeze. The strange thing about this is, when i remove the embedded server files and connected to the normal Firebird Server 1.5.3, it all works fine, i dont get a error. Im sure im not doing anything wrong, but cant find the problem. Things i checked: 1. I thought it was the way i connected to the embedded server, with the localhost value infront of the dbpath, but that didnt connect at all, so i remove it. So now i only connect to the physical path of the db file, without spesifying localhost or localconnect. Exmaple: Connecting as: FIBDatabase.defaultDatabase := 'c:\db.gdb'; and not as FIBDatabase.defaultDatabase := 'localhost:c:\db.gdb'; 2. Ive made sure that my database component uses the fbclient libery, and that my fbembed.dll is renamed to fbclient.dll 3. Anothing strange thing: Some of the MDI Child forms displaying lists work when called on the embedded server, but 2 or so doesnt work. Ive checked in my code, all of them are called on the same way, so this cant be the problem. Some Code Samples from my app: Database connection: Code:
procedure TfrmMain.Registry_LoadLocal;
Var
Registry : TRegistry;
begin
Registry := TRegistry.Create;
try
Registry.RootKey := HKEY_LOCAL_MACHINE;
Registry.OpenKey('Software\FACSoft\MedAssist', True);
Registry.ReadBinaryData('LocalDB',RegLocal,SizeOf(RegLocal));
Registry.CloseKey;
Registry.Free;
//Assign Local Registry Information to Database
frmDataModule.MedAssistDB.DBName :=
RegLocal.dbPath; //c:\db.gdb
frmDataModule.MedAssistdb.ConnectParams.UserName := RegLocal.Username; //sysdba
frmDataModule.MedAssistdb.ConnectParams.Password := RegLocal.Password; //masterkey
frmDataModule.MedAssistdb.Open;
except
On E: Exception do
ShowMessage('An error occured while trying to connect to the Local Database Server.');
end; // try..finally
end;
Im calling the MDI Child form like this: Code:
frmPatientList := TfrmPatientList.Create(Application); IM suing DELPHI 2006, with FIBPlus 6.41 Database components, using fbclient as my libery. Please help, im sure its not my code, its something with the embedded server, as everything runs fine when connected to the Firebird server(as localhost) and not the embedded |
![]() |
| Viewing: Dev Shed Forums > Databases > Firebird SQL Development > Strange embedded Firebird Behaviour |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|