|
I think you'll struggle to find a single component to do all that for you.
When it comes to de/encryption in Delphi, it's hard to beat dcpcrypt
As for your xml documents, just use the classes and interfaces available to you in the XMLDoc, XMLIntf, XMLDOM units. They give you TXMLDocument and IXMLNode, which is all you really need to load up a file and parse its nodes.
|
|
|
|
|
You can try NativeXML[^].
abeaumont wrote: Decrypt specific encrypted nodes in an XML file to a stream.
There is no real way of getting around this, however if I am not mistaken this class allows for events to fire when reading a node/attribute.
abeaumont wrote: Validate specific nodes against specific schemas (typically this will be the decrypted nodes, which will have their contents described in a encrypted schema)
I haven't needed to use this feature for the component in question, but I suppose fiddling around with that shouldn't be too much of a problem, even if you have to do your manipulation via the component, then use the XML DOM to load the schema.
abeaumont wrote: Parse large XML files (several hundreds MB's).
This would probably be more a case of the machine that the application will be running on and the efficiency of the XML traversal algorithm that the component uses. However, you must remember that traversing XML documents in itself tends to take longer based on the depth of the nodes. Expect delays in the region of something like:
TimeToLoad = ((XMLFileSize)^NodeDepth)/TraversalEfficiencyOfComponent
... or something to that effect. NOTE: This is a thumbsuck at best, but you will see what I basically mean when you load large XML files.
A plus of this component/class is the fact that it does not use the XML DOM at all... AND it is free... which to me is always a bonus .
Hope this helps
Cheers,
Glen Vlotman
QFTD: "You cannot code for stupidity."
|
|
|
|
|
Hello there
I have a source code for a program in a format of *.cpp ,*.dfm ,*.h
files.There is no project file,and about 60 files (20 each).
I need help to make it as a project so i can modify the source code and recompiling as i need it
I have very Little experience in programming,but i can follow instructions very carefully.
If some one can help me please send me a mail at
lagoraxi@netscape.net
thank you very much
papas
|
|
|
|
|
Hi. I think you may have a mixture of things there: *.cpp and *.h suggests you have a C++ project. *.dfm does indeed suggest Delphi form files, but without any *.pas (i.e. pascal) files, it's very unlikely that what you have is a Delphi proect.
|
|
|
|
|
I also guess it is a C++ project. Are you sure that the extension "dfm" actually stands for "Delphi Form"? It might as well be a ressource for the C++ program. This statement is false.
|
|
|
|
|
Now you come to mention it, I think C++ Builder used *.dfm file extension for its forms, too? I never used it myself, but it would be the most obvious explanation.
|
|
|
|
|
Hello
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
lagoraxi@netscape.net
and i will send you the source code
Thank you very much
papas
|
|
|
|
|
You don't build forms, you build a project.
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.
Dan
|
|
|
|
|
If you send me the files, may be i can assist you in deciphering it. Am using Codegear 2009 Architect.
email address is: ebifere@gmail.com
And make sure the files dont contain any virus
The Chief Priest of Oginiza
|
|
|
|
|
Hi,
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.
Could anyone please tell me a solution?
Thanks,
Sree
|
|
|
|
|
Hi,
I have java code. i want to convert this code into delphi.
please give me any converter code.
Regards
Raja
|
|
|
|
|
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.
You have to translate the code yourself.
This statement is false.
|
|
|
|
|
What kind of software can i use for developing a multilingual app in delphi?
I am thinking of using xml or dll. What are the differences pros and cons?
Can anyone please help me?
|
|
|
|
|
Well I know nothing of Delphi, but I do know that:
A dll is a library of classes and/or functions that can be used by an application as it runs.
XML is a method of representing a set of text elements in a structured manner.
The difference is that a dll and XML have no correspondence whatsoever.
|
|
|
|
|
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/
|
|
|
|
|
can i change computer name, motherboard sn, hard disk sn? if i can, please tell me how?
thanks
|
|
|
|
|
Hi,
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.
Cheers,
Glen Vlotman
"You cannot code for stupidity"
|
|
|
|
|
|
|
Hello,
when I place a TQuery component, on a form, it consumes memory until the application quits.
When I create/free the TQuery everytime I actually need it, the construction/destruction consumes time.
What do you think is better for the application's performance? Do you keep the visual component in memory all the time, or do you prefer to create objects on demand?
This statement is false.
|
|
|
|
|
Hi,
By default it should works properly and without consuming much memory, I use Delphi too but I never had that problem.
Check if somewhere else is problem and if you figure out then notify me,ok?
Regards.
I Love T-SQL
"Don't torture yourself,let the life to do it for you."
If my post helps you kindly save my time by voting my post.
www.aktualiteti.com
|
|
|
|
|
Blue_Boy wrote: if somewhere else is problem
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.
This statement is false.
|
|
|
|
|
Hi Corina,
Corinna John wrote: 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):
unit uDataController;
interface
uses
ADODB;
type
// my uber-super user defined event :P
TOnRetrieveData = procedure (ASender : TObject; AResultData : TADOQuery) of object;
TDataController = class(object)
private
FOnRetrieveData : TOnRetrieveData;
FDBConnection : TADOConnection;
FADOCommand : TADOCommand;
procedure InitialiseDBStuff;
public
constructor Create(AOnRetrieveDataEvent : TOnRetrieveData);
procedure ExecuteSQL(const ASQLString : string);
end;
implementation
constructor TDataController.Create(AOnRetrieveDataEvent : TOnRetrieveData);
begin
inherited Create;
InitialiseDBStuff;
// Assign the event...
FOnRetrieveData := AOnRetrieveDataEvent;
end;
procedure TDataController.InitialiseDBStuff;
begin
// 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...
FDBConnection.Open;
end;
procedure TDataController.ExecuteSQL(const ASQLString : string);
var
LQuery : TADOQuery;
begin
LQuery := TADOQuery.Create(nil);
try
FADOCommand.CommandText := ASQLString;
LQuery.RecordSet := FADOCommand.Execute;
if Assigned(FOnRetrieveData) then
begin
while (LQuery.RecordSet <> nil) do
begin
FOnRetrieveData(Self, LQuery);
// This is just a bonus because you could get more than one result data set from the query...
LQuery.RecordSet := LQuery..NextRecordset;
end;
end;
finally
FreeAndNil(LQuery);
end;
end;
So to use the controller you would do something like this:
uses
// other uses stuff
, uDataController;
TMyForm = class(TForm)
Button1 : TButton;
Memo1 : TMemo;
Memo2 : TMemo;
private
FController : TDataController;
procedure Perform_OnRetrieveData(ASender : TObject; AResultData : TADOQuery);
procedure MyButtonClick(ASender : TObject);
public
procedure AfterConstruction; override;
procedure BeforeDestruction; override;
end;
procedure TMyForm.Perform_OnRetrieveData(ASender : TObject; AResultData : TADOQuery);
var
LRows : Integer;
LIdx : Integer;
LLine : string;
begin
LLine := '';
Memo2.Lines.Add('Start a data result output...');
Memo2.Lines.Add('-----------------------------');
AResultData.First;
while not(AResultData.EoF) do
begin
for LIdx := 0 to AResultData.FieldCount-1 do
begin
LLine := LLine+' '+AResultData.Fields[LIdx].Value;
end;
Memo2.Lines.Add(LLine);
AResultData.Next;
end;
Memo2.Lines.Add(' End a data result output...');
Memo2.Lines.Add('-----------------------------');
Memo2.Lines.Add('');
end;
procedure TMyForm.MyButtonClick(ASender : TObject);
begin
Memo2.Lines.Clear;
try
FController.ExecuteSQL(Memo1.Text);
except
on E:Exception do
begin
Memo2.Lines.Add('Exception occurred when trying to execute sql script. Reason:');
Memo2.Lines.Add(E.Message);
end;
end;
end;
procedure TMyForm.AfterConstruction;
begin
FController := TDataController.Create(Perform_OnRetrieveData);
Button1.OnClick := MyButtonClick;
end;
procedure TMyForm.BeforeDestruction;
begin
FreeAndNil(FController);
end;
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
Cheers,
Glen Vlotman
"You cannot code for stupidity"
modified on Tuesday, December 14, 2010 7:55 AM
|
|
|
|
|
I am using TabbedNotebook in Delphi 6. How can I change color of a tab from TabbedNotebook? 
|
|
|
|
|
hi all,
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;
any ideas why this would be happening??
thanks in advance
K.
|
|
|
|