Firebird embedded Database Runtime error 217 lazarus / 16-Databases ---------------------------------------------------------------------- Fab · 2013-09-24 19:16 Hey guys, I've got a little problem creating a FB database file with IBConnection. I'm a total newbie in database programming but I hope you can help me. My code: Code: [Select]procedure TForm1.FormCreate(Sender: TObject); begin   UseEmbeddedFirebird := True;   IBConAddress.CreateDB; end; My properties: Charset : "UTF8" DatabaseName: "Address.fbd" Dialect: 3 Hostname: "" Params: "PAGE_SIZE=16384" Password: "masterkey" UserName: "SYSDBA" When I try to run my project there's a message: Run error 217 Is there also a good tutorial for FB with Lazarus? I'm looking forward to your answers. Greetings Fab ---------------------------------------------------------------------- BlueIcaro · 2013-09-24 19:34 hi, runtime 217 means: Quote 217 Unhandled exception occurred     An exception occurred, and there was no exception handler present. The sysutils unit installs a default exception handler which catches all excpetions and exits gracefully. So, try to run your program step to step (F8) to know  in which line you have the problem /BlueIcaro ---------------------------------------------------------------------- Fab · 2013-09-24 19:52 The error occurs in this line: Code: [Select]Application.CreateForm(TForm1, Form1); Maybe I should create the IBConnection in the code manually? ---------------------------------------------------------------------- taazz · 2013-09-24 19:57 as long as the IBConnection is not active the tie of compile it should not be a problem. ---------------------------------------------------------------------- CaptBill · 2013-09-24 19:58 Quote from: Fab on September 24, 2013, 09:52:00 pmThe error occurs in this line: Code: [Select]Application.CreateForm(TForm1, Form1); Maybe I should create the IBConnection in the code manually? Does your database already exist? Or are you attempting to build the db here in code? ---------------------------------------------------------------------- Fab · 2013-09-24 20:02 I want to create the database in code. ---------------------------------------------------------------------- CaptBill · 2013-09-24 20:15 Your best place to start is to learn the sql dialect. Start off getting to know the isql command line tool, and also the other tools. This keeps your database and the front end/graphical interface separated while you get up to speed. Spend a few hours building some things in isql first then worry about the front end. ---------------------------------------------------------------------- BigChimp · 2013-09-25 06:28 Quote from: Fab on September 24, 2013, 09:52:00 pmThe error occurs in this line: Code: [Select]Application.CreateForm(TForm1, Form1); This is suspicious. Assuming you're not doing strange things with forms, this shouldn't happen at all. Could you please specify your Lazarus and OS version? Please be aware that some x64 FPC/Lazarus versions on Windows 64 bit have issues when using the Firebird embedded library due to incorrect error handling by the FPC code. Errors normally caught in your Firebird dll would propagate into the FPC code and cause weird error messages. IIRC, this is explained on the Firebird embedded page in the Wiki.