...EndDate
The query is then something like:
with MyQuery do begin
close;
SQL.Clear; // build the main statement
SQL.Add(' SELECT * FROM TestTable';
SQL.Add(' WHERE ((ExpireDate BETWEEN :startdate AND :enddate)');
// or > :startdate - anything with a : preceding it is a...
Use the WindowState property:
Form1.WindowState := wsMaximized; // type TWindowState = (wsNormal, wsMinimized, wsMaximized)
Check out the help on WindowState, Application.Minimize and Application.Restore - it's all there.
Cheers,
Chris [pc2]
Delphi 5 Pro supported Paradox and dBase via the BDE, and it should be able to read them. Database Desktop has hardly changed since D5, so that shouldn't be an issue. If you can read them with this app, then D5 will work fine.
A quick look at the ODBC setup in WinXP shows it can read v3 to v5 of...
G'day Les,
Although I haven't done this - I have looked into it in the past. I assume your data structure will include date-time, string and numeric types.
Arrays get very messy to search, and hard to maintain if things go wrong (eg your on leave and it breaks). I tend to use arrays of...
Hi Andrew,
Not sure if this will help, but I had a similar problem when my PC didn't shut down properly about 18 months ago.
However, my home PC had a copy of the software running ok. I found there are three files (BORLAND.LIC, REGISTRY.DAT and REGISTRY.SLM) in C:\Documents and...
The path is an environment variable. You can see them listed from a command prompt by typing set.
To access any of these variables, use the Delphi function:
GetEnvironmentVariable(sVarname)
where sVarname is the environment variable - in your case 'PATH'.
The function returns a string, so you...
A quick look on Google (for trusted sites registry)found this information:
http://msdn.microsoft.com/workshop/security/szone/overview/esc_development.asp
and this (slightly more chatty):
http://www.microsoft.com/technet/scriptcenter/resources/qanda/feb05/hey0214.mspx
There is also some basic...
I beg to differ - from the help on TApplication, and the Application.Terminate help:
In my own apps, posts committed, files closed etc - no grief encountered [smile]
Cheers,
Chris [pc2]
Renaming is fairly simple use either of these functions:
Rename in the System unit
syntax: procedure Rename(var F; Newname: string);
This one assumes the file F exists, and is of any type
RenameFile in the SysUtils unit.
syntax : function RenameFile(const OldName, NewName: string): Boolean;
It...
You'll have to terminate the application (ie insert the code Application.Terminate;) rather than close the form if I understand you correctly.
Cheers,
Chris [pc2]
There are other ways to ensure that entry is as you require:
Use a TMaskEdit component - this allows you create an edit mask, which can then be handled without any other code - the component handles the checking. Just convert the resulting MaskEdit.Text to your integer
In D6 & D7 (not sure...
Delfy is probably correct - Delphi is Pascal and will set any uninitialised variable to a random value normally. Components such as DateTimePicker can't allow this to happen, so will default to the earliest date they can use in the system - usually the end of the 19th century (depending on your...
Sorry about that - my fault for writing it off the top of my head!
Here's a tested working version [tongue]:
var
sCurrLine,
nVar1, nVar2, nVar3, nVar4 : string;
I, nComma, nLastComma : integer;
begin
for I := 0 to (Memo1.Lines.Count - 1) do begin
// initialise the temporary...
Oops - forgot about your max/min question!
If your data is in an array, then you can use the MaxValue and MinValue functions (in the Math unit)
From the help file:
function MaxValue(const Data: array of Double): Double;
There are also MaxInt and MinInt functions for integer arrays.
However, how...
Do you write the data into the Memo, or read it in from a file? Your data looks like a Comma Separated Value (CSV) format file.
If your reading it in, a very simple way to extract the data is use a READLN(fInFile,Var1,Var2,Var3,Var4.....varN);
This will require you to know the types of each...
...MDAC.
Similarly, Delphi has variations on this. One of the things I do is test the SQL in the Database Desktop.
I suspect that your Name LIKE "*"wildcard should be NAME LIKE "%"
To illustrate some other features - here's a piece of SQL that I use in one of my queries:
SELECT pat_handle...
Oops - just noticed an extra bracket and extra BETWEEN in the SQL statement. It should read:
SQL.Add:='SELECT * FROM Total1 WHERE (Data BETWEEN :Date1 and :Date2)';
BTW, I assume that Data is a date variable. If not, you'll have to ensure that the variable your testing with the WHERE is the...
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.