Thanks, I'll check out the Delphi help regarding the TStringList. Even though for purposes of this program, the Array of records structure should do adequately.
But you never know, I might come up with something fishy (and strange ideas must be always implemented!) so I'll definitely check it out.
This would also be useful in preventing SQL injection... One option would be to put all SQL keywords in an array and make a string comparison to every word, but as usual I hardly think that would be the easiest way to go...
Thanks!
Do you know, when is the memory allocation made to such an array, is memory allocated to an array of 1000 records when the program is ran, or are memory allocations made as they are required (iow, values and names are allocated)?
Also, is there any way of making the array dynamic, as...
Ah, you're saying that I might end up with an indefinite loop, or no loop at all, (resulting in NULL values on my calculations) if I use recordCount as a means of getting the loop limiter.
Even though it sounds strange, that the function working or not, was somehow connected to the type of the...
Well what do you know, it worked...
Now, a more of a general sort of question regarding arrays.. I'd like to have one that's (At lest in PHP) referred to as an associative array, IOW something along these lines
adult -> 7.00
child -> 4.50
student-> 4.50
etc.
So I could associate a floating...
Hi,
I'd like to have my nice little function return an array, I'd expect this to be possible, but when I do this...
function GeneralCalculatePosition(WidthHeight: Integer; spacing: Integer; padding: Integer; multiplier: Integer):Array of Integer;
begin
if multiplier<>0 then
if multiplier=1...
Hey, I solved it!
I'm gonna look into that sum() thing, not that I'd use it now (now that I got this working), but just to learn.
form1.InsertQuery.SQL.Clear;
form1.InsertQuery.SQL.Add('SELECT * FROM tbl_sales WHERE history = ''0''AND ticket = ''adult''');
form1.InsertQuery.open;
apuint :=...
Well, in my case, record.count works, so no problems there, just didn't know it existed :D
Anyway, any thoughts on this, counting the contents of the fields thing?
Thank you for the answers thus far, I'm afraid I don't understand the latter.
What exactly is a 'calculated field'?
In the code example, why are there both, AsString and then IntToStr?
As for the first one, it works just fine, thanks!
Here is the trial
http://www.woll2woll.com/DownloadsTrial.html
At the same site, you can purchase the full version.
From your question, one might interpret that you want to download it for free, that would be warez, and I don't know how the forum administrators feel about that..
Hi,
I'm making a rather simple database program, with TurboDelphi. I would like to make some calculations, based on some DB data, provided by a TQuery component over ODBC.
I would like to do the following:
Count rows that were returned by the query.
The only way I found that could do this, is...
Hi,
I've been asking about databases before, and 'til now, had to use BDE for my database connectivity. I'm currently using TurboDelphi for development.
I wanted to use dbExpress to connect to a mysql database to do some simple database editing, but what do you know, it doesn't work :(
Here's...
Hmm, I was able to redo these steps in a larger project of mine, and it all actually works (I'm amazed)
How does one destroy dynamically the dynamically created object?
CPanel.Free; results in nothing that I can see,
CPanel.Destroy; Results in crash...
Thanks man, that worked, after some tweaking.
The following includes the corrected version. Changes are marked as comments and appear red
(This is just to help others who might find the code useful)
You also had some mixup in the button variable name, that part is not coloured.
unit...
Hi all,
I have a slight problem when attempting to create a class. I'm creating it, based on TPanel, and it is supposed to include a button showing the text hello world.
unit spanel;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs...
What if I wanted to completely rewrite it?
Also, I tried it like this
procedure TForm1.Button1Click(Sender: TObject);
begin
Showmessage('Message');
end;
procedure TForm1.BitBtn2Click(Sender: TObject);
begin
Close;
end;
procedure TForm1.BitBtn1Click(Sender: TObject);
begin
BitBtn2.OnClick...
The subject covers it,
I want to make button1 change the OnClick Event of Button2 wile running the program.
The actual problem is a little more complex, but I'll explain the rest when I can get the basics straight.
The point of the entire program is to be able to view multiple entries at the same time, thus creating the need for runtime page creation.
But I solved the problem. Along with each page, and dbedits, I create a Query object, and export the selected row number (in this case, a target number)...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.