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 bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

date error with MySQL in Delphi

Status
Not open for further replies.

aaanadie

Programmer
Mar 21, 2005
6
US
Hi,

I'm using Delphi 2005 and MySQL 4.1. I can not modify a date field:

unit Unit1;

interface

uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, DB, DBTables, StdCtrls, Mask, DBCtrls;

type
TForm1 = class(TForm)
Database1: TDatabase;
Table1: TTable;
DBEdit1: TDBEdit;
DataSource1: TDataSource;
Button1: TButton;
procedure Button1Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;

var
Form1: TForm1;

implementation

{$R *.dfm}

procedure TForm1.Button1Click(Sender: TObject);
begin
DBEdit1.Field.DataSet.Post;
end;

end.

The program is very very simple. I do not know what is wrong.

Thanks in advance.
 
How are you accessing MySQL ?

Possible answers are ODBC, dbExpress and so on.

MySQL requires that the date is in the format 'yyyy-mm-dd'.

HTH

Andrew
Hampshire, UK
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top