I am trying to test some code on the new 5.0 version and am getting
problems.

I currently have two MYSQL's running on two differing machines. Both have
the same schema set up by the my own program. The difference is that Machine
1 was set up on version 4.1 and then upgraded to 5. Machine 2 was a fresh
installation of version 5.

My Data insertion code works perfectly well with the Version 5 instance that
was upgraded from version 4, but fails on the pure version 5. The
Administrator interface tells me that the tables are OK and I cannot see any
difference between the V4 upgraded to 5 table against the pure V5 install.

The code being used is
INSERT INTO Invs
(InvRef,InvDate,Outgoingref,Outgoingref2,BillDescription,BillAmount,VatCode,
VatRate)
VALUES
 ('1234#6','19991016','C','19990731','\"Orig Bill
£728.50\"',364.68,'A',17.50);

The table columns are set to
char(12),date,char(1),date,char(40),decimal(12,2),char(1),decimal(3,2). The
table is MyISAM.

There error produced on the pure version 5 installation is:
"Out of Range value adjusted for column VATRate at row 1"
and then quits. I have let the installation of MySQL use its defaults and is
of charset "latin1" if it is an issue. The above statement does not error on
the upgraded version of MySQL but adds the row with no problem.

The set up program is using a function
   with SQLBatch.SQL do
   begin
      Add('CREATE TABLE Invs (');
      Add('InvRef char(12) default NULL,');
      Add('InvDate date,');
      Add('OutgoingRef char(1),');
      Add('OutgoingRef2 date,');
      Add('BillDescription char(40),');
      Add('BillAmount decimal(12,2),');
      Add('VATCode char(1),');
      Add('VATRate decimal(3,2),');
      Add('  index (OutgoingRef2)');
      Add(') TYPE=MyISAM;');
   end;
   SQLBatch.ExecSql;

This seems to work fine. Any ideas on why it works with one and not the
other?

Kerry


-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to