I have a problem with TMySQLmonitor:
First I log a transaction (with TMySQLMonitor) that is generated by adding and posting a new record to tbl_orders (see example SQL) through a normal dbgrid and dbedits.
Then I would like to execute this logged SQL statement again by calling it to the database through a TMyCommand. 
This generates an error. Why does MySQL accept the initial logged SQL statement, and not the same SQL statement run again through TMyCommand???
Here is the logged SQL statement:
INSERT INTO tbl_orders
  (ordr_ID, ordr_DateTime, ordr_LocationID, ordr_EmployeeID)
VALUES
  (:1, :2, :3, :4)
:1(Integer,IN)=119
:2(DateTime,IN)=24-9-2006
:3(Integer,IN)=1
:4(Integer,IN)=1
Should I make change to any components or to MySQL to get it to work??
Any help is very much appreciated!!
Krimson
			
									
									
						Problem with TMySQLmonitor
This SQL command is not valid for MySQL Server. We use such format to give more information about executed query to user. If you want to make this query working in TMyCommand, you should change parameter names in the query to actual values. For example:
			
									
									
						Code: Select all
INSERT INTO tbl_orders 
(ordr_ID, ordr_DateTime, ordr_LocationID, ordr_EmployeeID) 
VALUES 
('119', '24-9-2006', '1', '1') One more way to show SQL statements that are sent to the server is setting MySQLMonitor.TraceFlags.tfMisc to True and checking this flag in the handler of OnSQL event. This may look like this:
			
									
									
						Code: Select all
procedure TForm1.MySQLMonitor1SQL(Sender: TObject; Text: String;
  Flag: TDATraceFlag);
begin
  if Flag = tfMisc then
    ShowMessage(Text);
end;