problem about delphi-5-Collection of common programming errors


  • David Heffernan
    delphi components vcl delphi-5
    I am working in Delphi5I would like to have a custom form appear before a component is destroyed at runtime of a project. Is it possible to do this from within a Custom Component? In other words, can I display a form before the custom component is destroyed in runtime, when the form on which it is placed, is closed?I have tried placing the following in the destructor of the component, but I get an access violation error when the form is closed:destructor TqqFormLogger.Destroy; beginif NOT (csDes

  • Ian Boyd
    delphi rtti delphi-5
    Is there at way, at runtime, to find all classes that descend from a particular base class?For example, pretend there is a class:TLocalization = class(TObject) … publicfunction GetLanguageName: string; end;or pretend there is a class:TTestCase = class(TObject) … publicprocedure Run; virtual; end;or pretend there is a class:TPlugIn = class(TObject) … publicprocedure Execute; virtual; end;or pretend there is a class:TTheClassImInterestedIn = class(TObject) … publicprocedure Something; end;

  • Fabricio Araujo
    delphi odbc delphi-5
    can we create ODBC datasource connection at runtime? If yes then can you plz help regarding how to do it. Currently I am created the ODBC datasource connection manually through Control Panel–> Administrative Tools –> Datasources. But i want to create that at runtime when user run application.thanks for the help.

  • Blobby
    delphi delphi-5
    I am using delphi 5 and have installed some custom components. When I try to open a form from the IDE I am getting the following error:Class TdxButtonEdit not found. dxEdit.bpl package contains thatTdxButtonEdit.dxEdit.bpl is runtime package, how to install it? When I try I am getting the error: Cant install because its not design time package.

  • ollo
    delphi delphi-5
    just had a crash with an SSD (a days work went missing!) and have had to go back to a HDD.I have just installed D5 on the HDD and would like to try and find the Library Paths file so I can just copy it all across. There are about 40 Path-entries in it.Using a USB adapter I searched the SSD for file contents with a fragment of a Path that the file contains but it came up zip.$(DELPHI)\Lib;$(DELPHI)\Bin;Can anyone one please point me at where the Library Paths are actually stored? Thank you.

  • Vaccano
    delphi profile delphi-5
    My computer crashed recently. We have a Delphi app that takes a lot of work to get running.One of my co-workers has it all installed still. Is there a way to copy the stuff stored in the palette? And the library paths?I am using Delphi 5 (I know it is very very very old)

  • Warren P
    delphi unicode delphi-5 unicode-string widestring
    i am trying to construct a (test) WideString of:á (U+00E1 Small Letter Latin A with acute)but using it’s decomposed form:LATIN SMALL LETTER A (U+0061) COMBINING ACUTE ACCENT (U+0301)So i have the code fragment:vartest: WideString; begintest := #$0061#$0301;MessageBoxW(0, PWideChar(test), ‘Character with diacratic’, MB_ICONINFORMATION or MB_OK); end;Except it doesn’t appear to work:This could be a bug in MessageBox, but i’m going to go ahead and say that it’s more likely the bug is in my code.So

  • user2220358
    delphi sqlite3 delphi-5
    just copying a system (been working for years on win7) over to win8 and everything runs (9 other programs) except the two apps that use SQLite3. This was built using D5ent and ZEOS 6.6. Can’t go to Zeos 7 as it will not compile in D5 and I really do not want to convert this to 2007.Both crash with “SQL Error: Library routine called out of sequence.”I have no idea what that means or how to fix it. I tried moving he entire thing to a non-restricted, well, less-restricted part of the HDD and still

  • kobik
    delphi webbrowser-control delphi-5 twebbrowser flashplayer-10
    Here is my code:typeTForm1 = class(TForm)WebBrowser1: TWebBrowser;Button1: TButton;Button2: TButton;procedure Button1Click(Sender: TObject);procedure Button2Click(Sender: TObject);end;implementation uses ActiveX;procedure TForm1.Button1Click(Sender: TObject); // method 1 varHtmlFile: string; beginHtmlFile := ExtractFilePath(Application.ExeName) + ‘test.html’;WebBrowser1.Navigate(HtmlFile); end;procedure LoadHtml(wb: TWebBrowser; HTMLStr: string); varaStream: TMemoryStream; beginwb.Navigate(‘abou

  • jayAnn
    web-services delphi delphi-5
    I have this problem regarding my program in delphi. I want to delete data in the table with this request url: http://localhost:8001/delete/woodSpecie?json={“SessionID”:”MVykZKX31d19dYnywxsXM1MdPy0U7VW8″,”wood_specie_id”:”80″}I am creating a web service actually.the following is my delphi code:dm.SessionValidate(SessionID);dshWoodSpecie := TDSHandlerWoodSpecie.Create(nil, dm);tryif dshWoodSpecie.Dataset.isEmpty thenraise Exception.Create(‘Wood Specie table is empty.’)elsebeginif Params.Field[‘woo

  • Rick77
    delphi delphi-5
    I have implemented an editable DBGrid. If a field is not filled correctly an exception is thrown and a message is shown, for example:’08:00::00′ is not a valid timeHow can I catch those exceptions so that I can show messages written by me instead of the automatically generated ones? I would be thankful for any help.

  • J…
    delphi exception-handling delphi-5
    I am using D5 and Synaps with OpenSSL and it is working great. I am trying to handle crashes so have deliberately entered bad data, one try at a time. So far I have handled the induced crashes OK, but I just changed the login Password and tried to login.gMajorFail:=False; if not pop3.Login() then begingMajorFail:=True;raise EPOP3.Create(‘POP3 ERROR: ‘+IntToStr(pop3.Sock.LastError)+’ When trying to Login to Account’); end; if gMajorFail then GoTo HadFailure;Instead of jumping to the HadFailure-La

  • smok1
    delphi open-source exception-handling delphi-5
    Do you know any Open Source libraries for Delphi to serialize exceptions? I want to have a form “Exception has occurred”, so my users will be able to email error report to me. But apart from serializing exception manually, are there any open source libraries, that will serialize exception to XML or even flat file?The absolute must-be: must work with Delphi 5.

  • Stuart Golodetz
    delphi exception-handling delphi-5
    In Delphi 5, I’ve currently written code that calls Free on multiple variables in a finally block, e.g…. finallya.Free;b.Free;c.Free; end;This code assumes that Free can never raise, since if, for example, a.Free raised, the memory for b and c would be leaked. Is this assumption justified?

  • user2373289
    multithreading delphi delphi-5
    Using Delphi-v5 and a component (TmFileScan — thanks Mats) that runs in a thread and I want to be able to Terminate the thread gracefully. After a lot of searching and reading here, I have been able to Terminate it but I need an Event to handle some screen-clean up after an Abort.In the Thread I have addedwhile not(Terminated) do // Iterating about a zillion times :)…Then in the app…Button1Click… beginSearchThread.Terminate; end;and it works nicely. I have the screen clean up in the exist

  • Jeroen Wiert Pluimers
    delphi delphi-5
    can anyone tell me why I get “Return value … might be undefined” here:function TXMLAcceptorBCOLSubmission.createRecordsInBCFEEPAR(AXML: TRipXMLElement): String; var… beginResult := ”;

  • notidaho
    delphi delphi-5
    I am trying to add an Advantech (BDaqCL.pas) library to my application project in Delphi 5 but the .PAS file is riddled with code such as:AccessMode = (ModeRead = 0,ModeWrite,ModeWriteWithReset );which causes the error:’,’ or ‘)’ expected but ‘=’ foundIs this a feature of the later versions of Delphi which is not compatible in D5? If so is it worth manually changing everyone (there are many) or am I bound to run in to much deeper problems?Edit: Most the enumerations are as above but there’s also