Consult a great god
CodePudding user response:
In your new line binding data sourcesCodePudding user response:
How is C/S:procedure TMID_2_2_Frm. Button3Click (Sender: TObject);
Var S, SQL, Date1, ID, err: string;
The begin
Date1:=FormatdateTime (' - dd yyyy - MM, DateTimePicker3. Date);
DateTimetoString (ID, 'yymmddhhnnsszzz, now);
SQL:='INSERT INTO parameter _ borrowing credentials (date, ID) VALUES (' +
# 39 + Date1 + # 39 + ', '+
# 39 + ID + # 39 + ');
If DataModule1. SocketConnection1. AppServer. MyQuery (SQL, err)
Then the begin
With DBGridEh1. The DataSource. The DataSet do
The begin
Append.
FieldByName (" date "). AsString:=Date1;
FieldByName (' ID '.) asString:=ID;
Post;
end;
end;
end;
If direct operation database:
procedure TMID_2_2_Frm. Button3Click (Sender: TObject);
Var S, SQL, Date1, ID, err: string;
The begin
Date1:=FormatdateTime (' - dd yyyy - MM, DateTimePicker3. Date);
DateTimetoString (ID, 'yymmddhhnnsszzz, now);
With DBGridEh1. The DataSource. The DataSet do
The begin
Append.
FieldByName (" date "). AsString:=Date1;
FieldByName (' ID '.) asString:=ID;
Post;
end;
end;