-
For data source controls, such as table or query, direct close open is more than .active:=false true is a bit better, because.
active:=false true is still called close open in the end; However, when we program, we often use active:=false true+open in combination, which is more convenient for individuals, such as:
strsql:='select * from abc where ..';
with do
beginif active then active := false;
commandtext := strsql;
open;end;
than: with do
beginif open then close;
commandtext := strsql;
open;end;
It feels convenient.
-
Beginners use table, and when you find that the data you need is fetched from multiple tables, you use query.
If you have a good SQL foundation, you will almost always only use Query.
-
Try not to use table controls, native use and lightweight databases are not yet very obvious. Once the volume of data increases and the database is accessed through the network, the disaster will be devastating.
-
In Delphi, the types of mathematics are divided into: numeric and character.
Numerical types are divided into integer and real types.
As the name suggests, integers are integers, and integers are divided into signed integers and unsigned integers.
A real type is a data type that has decimals.
When you are calculating, if the calculation result may need to use decimals, then use real, as for which precision decimal to use, it depends on the accuracy you want. Floating-point arithmetic is more CPU-intensive, and splitting data into different types to improve CPU operation efficiency is also a reason.
string is the type of string, e.g. :'Chinese'This is a string, and as the name suggests, it is a string of strings.
char is a character type, which is different from string, the char type occupies one byte, that is, the char type can only hold one character at most, for example'a'or'b'If you assign more than its size, an error occurs.
In fact, regardless of the various data types, when it comes to compilation, it becomes one type, that is, numeric.
That's ord ('a'The reason why it is equal to 97 is the reason.
You should look at the basics of computers, such as how data is stored in a computer, bits and bytes and the concept of words, and you will understand.
After reading your **, let's explain the problem in your ** to you. >>>More
procedure : tobject);
vararr:array of array of string; >>>More
If delphi is a posting software, there are two similar types, one is the simulation of the mouse and keyboard, and the other is the simulation of sending network packets. >>>More
Connecting oracle's stored procedure with Delphi's tadostoreprocedure works executable, I've used it a few times, it's just that my stored procedure is written in the middle of the three layers, and I don't return a dataset. >>>More
function getsqlserverlist(strings:tstrings):boolean;
The function is implemented as follows: >>>More