Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search results for query: *

  1. wizzor

    How to make a function return an array?

    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.
  2. wizzor

    SQL Keyword List function

    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...
  3. wizzor

    How to make a function return an array?

    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...
  4. wizzor

    TQuery, counting, adding and so on

    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...
  5. wizzor

    How to make a function return an array?

    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...
  6. wizzor

    How to make a function return an array?

    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...
  7. wizzor

    TQuery, counting, adding and so on

    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 :=...
  8. wizzor

    TQuery, counting, adding and so on

    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?
  9. wizzor

    TQuery, counting, adding and so on

    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!
  10. wizzor

    I Need for inforpower

    Well there we have it, I'll say no more.
  11. wizzor

    I Need for inforpower

    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..
  12. wizzor

    TQuery, counting, adding and so on

    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...
  13. wizzor

    TurboDelphi MySQL Connectivity problem

    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...
  14. wizzor

    Class creation problem

    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...
  15. wizzor

    Class creation problem

    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...
  16. wizzor

    Class creation problem

    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...
  17. wizzor

    Changing event procedures runtime?

    OK, that helped a bit, What if i created a button runtime, and then set a procedure to some of its events, how would I accomplish that?
  18. wizzor

    Changing event procedures runtime?

    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...
  19. wizzor

    Changing event procedures runtime?

    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.
  20. wizzor

    Delphi databases: how to not use DBNavigator?

    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)...

Part and Inventory Search

Back
Top