Page 1 of 1

Delphi program compiles but doesn't run

Posted: Fri 12 Nov 2004 13:20
by lgojer
I created a delphi program that has a variable of type
TOraSession. In the program, it sets the server, user name,
and password, and then there is the line: OraSession1.Connect;
where it bombs when running. (In other words, it compiles,
but fails to initialize the Session variable correctly) What code
do I have to have to initialize a TOraSession correctly? I tried
New(OraSession1);, and it told me "incompatible types" in the
compiling stage.

Posted: Mon 15 Nov 2004 07:21
by Paul
As I can see from your sources you forget to create the instance of the object. Please add the following code line before using OraSession1 variable. OraSession1 := TOraSession.Create(nil);

Thank You

Posted: Mon 15 Nov 2004 14:48
by Guest
Thank You very much for your help. It worked perfectly.