Recent

Author Topic: Firebird embedded Database Runtime error 217  (Read 6602 times)

Fab

  • Newbie
  • Posts: 3
Firebird embedded Database Runtime error 217
« on: September 24, 2013, 09:16:36 pm »
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
« Last Edit: September 24, 2013, 09:25:34 pm by Fab »

BlueIcaro

  • Hero Member
  • *****
  • Posts: 832
    • Blog personal
Re: Firebird embedded Database Runtime error 217
« Reply #1 on: September 24, 2013, 09:34:04 pm »
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

  • Newbie
  • Posts: 3
Re: Firebird embedded Database Runtime error 217
« Reply #2 on: September 24, 2013, 09:52:00 pm »
The error occurs in this line:

Code: [Select]
Application.CreateForm(TForm1, Form1);
Maybe I should create the IBConnection in the code manually?

taazz

  • Hero Member
  • *****
  • Posts: 5368
Re: Firebird embedded Database Runtime error 217
« Reply #3 on: September 24, 2013, 09:57:50 pm »
as long as the IBConnection is not active the tie of compile it should not be a problem.
Good judgement is the result of experience … Experience is the result of bad judgement.

OS : Windows 7 64 bit
Laz: Lazarus 1.4.4 FPC 2.6.4 i386-win32-win32/win64

CaptBill

  • Sr. Member
  • ****
  • Posts: 435
Re: Firebird embedded Database Runtime error 217
« Reply #4 on: September 24, 2013, 09:58:33 pm »
The 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

  • Newbie
  • Posts: 3
Re: Firebird embedded Database Runtime error 217
« Reply #5 on: September 24, 2013, 10:02:45 pm »
I want to create the database in code.

CaptBill

  • Sr. Member
  • ****
  • Posts: 435
Re: Firebird embedded Database Runtime error 217
« Reply #6 on: September 24, 2013, 10:15:16 pm »
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

  • Hero Member
  • *****
  • Posts: 5740
  • Add to the wiki - it's free ;)
    • FPCUp, PaperTiger scanning and other open source projects
Re: Firebird embedded Database Runtime error 217
« Reply #7 on: September 25, 2013, 08:28:02 am »
The 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.
Want quicker answers to your questions? Read http://wiki.lazarus.freepascal.org/Lazarus_Faq#What_is_the_correct_way_to_ask_questions_in_the_forum.3F

Open source including papertiger OCR/PDF scanning:
https://bitbucket.org/reiniero

Lazarus trunk+FPC trunk x86, Windows x64 unless otherwise specified

 

TinyPortal © 2005-2018