I have no project file ,just the source code.I thing it's a C++builder project.
I was try to recover the project by building the forms and then copy all the files to the same directory using CodeGear RAD Studio 2009 Delphi & C++Builder.I can view the forms but i can't build them,i get error's.
Can someone please help me on how to compile the project??
Please mail me at
and i will send you the source code
Thank you very much
If you don't have a project file then you have no choice but to make one. I suggest dumping all the files you have into one directory, creating a new project, adding all of your various *cpp/*h files to it, electing the most likely-looking form to be the 'main' form (i.e. the one created when the program starts) and taking it from there. If you have little experience of dealing with projects then this is not going to be an easy task.
Member 3862339 wrote:
and i will send you the source code
No thanks! I have quite enough to do already, but I'm happy to give advice.
I need to develop an ActiveX library which consists of an Indy HTTP server object (TidHTTPServer). In this the server object will listen to a particular port and will log the incoming requests to a file.
I am using RAD 2010 as IDE and trying in a way as follows..
1. Created an AciveX library project, Added a new Active Form, Added the TiDHTTPServer control to this form
2. Set the DefaultPort property, Added custom methods StartListen() and WriteLog()
3. In StartListen(), just makes the 'ACTIVE' property of HTTP server object to 'TRUE' and writes some log.
4. Built it and registered the OCX
5. Now, created a new windows forms project (tester) and imported this ocx component. Then added this control from the toolbar to the form. and called the StartListen().
It is throwing Access Violation error while running this tester application. If I comment the HTTP Server dependent code by keeping only the write log code, it works and writes the log also.
Java and Delphi use very different libraries. That means, most Java framework classes don't have an ideal complement class in VCL. Some things that are classes in Java (like String) are primitive types in Delphi.
Delphi has a little built-in tool that handles internationalization. But it´s really basic.
You also got a couple of commercial localization tools that support Delphi applications: Multilizer (http://www2.multilizer.com/) and Sisulizer (http://www.sisulizer.com/), and an open-source tool based on GetText: http://dxgettext.po.dk/
You can rename the computer using windows API calls (I can't remember them offhand, but I'll see if I can dig them up somewhere). I stand to be corrected on this, but as far as I know you cannot change the serial numbers of motherboards and/or hard disk drives.
"You cannot code for stupidity"
There is no problem at all. I only asked what people think about memory usage and performance.
I made a test with
- a DataModule with a TQuery and
- a simple class that creates the TQuery on the fly
both containing the same method.
Strangley, the method ran a few milliseconds faster in the class without visual components. The DataModule with visual components worked a few milliseconds slower, though (in theory) the components involved should have been the same. That means, the way you create instances - by drag&drop or create/free - actually does matter.
when I place a TQuery component, on a form, it consumes memory until the application quits.
The amount of memory that your query will consume is directly related to the amount of data which you are retrieving from the database, and as such cannot be helped. What you could do is look at how many fields are being returned and reducing that amount to only those fields that you need.
Corinna John wrote:
When I create/free the TQuery everytime I actually need it, the construction/destruction consumes time.
I've found that creating/destroying the components dynamically isn't time consuming. What will take time is establishing the connection to the database and the subsequent retrieval of the data from the query.
Since I hardly every use data-aware controls, most of the time I dynamically load the data to the screen(s) by creating a data controller which will provide the functionality for retrieving/updating the data from the database. Ideally this controller will have some database connection object within it, and a query/command object to query the database with. These data objects should be created and destroyed in the controller's constructor/destructor respectively. Then, by using events, you can perform some kind of action on the resulting query which you executed.
So a controller would look something like this (I see you are using the TQuery component, and although I am using ADO, the theory is still basically the same):
// my uber-super user defined event :P
TOnRetrieveData = procedure (ASender : TObject; AResultData : TADOQuery) of object;
TDataController = class(object)
FOnRetrieveData : TOnRetrieveData;
FDBConnection : TADOConnection;
FADOCommand : TADOCommand;
constructor Create(AOnRetrieveDataEvent : TOnRetrieveData);
procedure ExecuteSQL(const ASQLString : string);
constructor TDataController.Create(AOnRetrieveDataEvent : TOnRetrieveData);
// Assign the event...
FOnRetrieveData := AOnRetrieveDataEvent;
// Initialise the connection and command components
FDBConnection := TADOConnection.Create(nil);
FADOCommand := TADOCommand(nil);
FADOCommand.CommandType := cmdText;
FADOCommand.Connection := FDBConnection;
// setup the connection
FDBConnection.ConnectionString := 'this should now be your connection string';
// ensure that you are not prompted for the server login prompt...
FDBConnection.LoginPrompt := False;
// now we can open the connection...
procedure TDataController.ExecuteSQL(const ASQLString : string);
LQuery : TADOQuery;
LQuery := TADOQuery.Create(nil);
FADOCommand.CommandText := ASQLString;
LQuery.RecordSet := FADOCommand.Execute;
if Assigned(FOnRetrieveData) then
while (LQuery.RecordSet <> nil) do
// This is just a bonus because you could get more than one result data set from the query...
LQuery.RecordSet := LQuery..NextRecordset;
So to use the controller you would do something like this:
// other uses stuff
TMyForm = class(TForm)
Button1 : TButton;
Memo1 : TMemo;
Memo2 : TMemo;
FController : TDataController;
procedure Perform_OnRetrieveData(ASender : TObject; AResultData : TADOQuery);
procedure MyButtonClick(ASender : TObject);
procedure AfterConstruction; override;
procedure BeforeDestruction; override;
procedure TMyForm.Perform_OnRetrieveData(ASender : TObject; AResultData : TADOQuery);
LRows : Integer;
LIdx : Integer;
LLine : string;
LLine := '';
Memo2.Lines.Add('Start a data result output...');
while not(AResultData.EoF) do
for LIdx := 0 to AResultData.FieldCount-1 do
LLine := LLine+' '+AResultData.Fields[LIdx].Value;
Memo2.Lines.Add(' End a data result output...');
procedure TMyForm.MyButtonClick(ASender : TObject);
on E:Exception do
Memo2.Lines.Add('Exception occurred when trying to execute sql script. Reason:');
FController := TDataController.Create(Perform_OnRetrieveData);
Button1.OnClick := MyButtonClick;
DISCLAIMER: I have not tested this code, so if it contributes to global warming for some reason, I relinquish myself from any consequences it may have on the tragic collapse of the lifecycle of the common sea cucumber...
Hope that helps
"You cannot code for stupidity"
i'm having a problem with aggregate fields on a filtered dataset. before apply a filter, my aggregate fields look fine. as soon as a filter is applied to the dataset, the aggregate fields return me null.
this is an example of how i'm creating an aggregate field.
fld = new TAggregateField(ClientDataSet);
fld->Active = true;
fld->Expression = "SUM(Amount)";
fld->ResultType = ftFloat;
fld->FieldName = "TotalAmount";
fld->DisplayFormat = "0.00";
fld->Alignment = taRightJustify;
fld->Index = DataSet->FieldCount;
fld->DataSet = DataSet;
fyi - yes I have set the filtered property, the filter works fine on the dataset. only the aggregate field does not get updated. and i dont want to re-open the dataset, i've already got the set of records i want to work with, i just need the aggregate field to re-calculate.
Hi, I'm a C++ programmer that is looking into learning Delphi. I've been googling around trying to find the differences. More specifically, I've been wondering, can Delphi create, or do some unique feature, that C++ can't. So far all the sights I've been to, have not boasted such a claim, or I'm just going to all the wrong sights. I know Delphi compiles fast, creates fast applications with hardly any work, but I'm wondering more about the ability to create apps a C++ project would never dream of. Like for example, in VB, you can't create DLLs, But in C++ you can. Or in C++ you can multi-thread...
A link to a site would be just fine.
I've been wondering, can Delphi create, or do some unique feature, that C++ can't.
No such thing. Delphi is a layer on top of assembly, just as C++.
Member 4641878 wrote:
I know Delphi compiles fast, creates fast applications with hardly any work, but I'm wondering more about the ability to create apps a C++ project would never dream of.
Go for C# - you can create WPF-applications that a low-level programmer can only dream of. I surely wouldn't be able to recreate all that functionality in Delphi.
Member 4641878 wrote:
Like for example, in VB, you can't create DLLs, But in C++ you can. Or in C++ you can multi-thread...
VB is a very closed environment, but you can use the WinAPI. You can even use VB.NET to add real threading to a VB6-application. I'm using Delphi 6 only for small command-line applications for those clients who don't have/want the .NET framework.
Now, therein' lies the last advantage that Delphi has; it can create native executables that don't need a runtime. Anyway, that's something that C++ can do too
I are Troll
Last Visit: 20-Jul-19 8:15 Last Update: 20-Jul-19 8:15