I am experiencing problems trying to dynamically link tables in Microsoft Access 2000 using ODBC and MYSQL. MYSQL Ver 11.12 Distrib 3.23.32, for pc-linux-gnu (i686) ODBC myodbc-2.50.36-win95 MS Access2000 with MDAC 2.1 The error messages I am getting are "this record has been changed by another user since you started editing it" I believe it is due to duplicate timestamp(14) values. For Example: I have a simple data base created using the following statement: create table example (id int(11) NOT NULL AUTO_INCREMENT, name varchar(10),timestamp timestamp(14),PRIMARY KEY(id)); ***no problem*** mysql> describe example; +-----------+---------------+------+-----+---------+----------------+ | Field | Type | Null | Key | Default | Extra | +-----------+---------------+------+-----+---------+----------------+ | id | int(11) | | PRI | NULL | auto_increment | | name | varchar(10) | YES | | NULL | | | timestamp | timestamp(14) | YES | | NULL | | +-----------+---------------+------+-----+---------+----------------+ 3 rows in set (0.00 sec) ***problem*** when I import external data in the following format (example.csv) 1,aaaaaaaaaaaaaaaaa 2,bbbbbbbbbbbbbbbbb 3,ccccccccccccccccc using the following statement: load data local infile '/home/fred/example.csv' replace into table example FIELDS TERMINATED BY ','; mysql> select * from example; +----+------------+----------------+ | id | name | timestamp | +----+------------+----------------+ | 1 | aaaaaaaaaa | 00000000000000 | | 2 | bbbbbbbbbb | 00000000000000 | | 3 | cccccccccc | 00000000000000 | +----+------------+----------------+ 3 rows in set (0.00 sec) The timestamp has not been changed upon import and hence is duplicated throughout. ***Question*** Is there any way to import from an external source and create a modified (unique) timestamp upon import ? I have tried defining the timestamp(14) column with "default 'now' ", suggested by somone else with a similar problem but it doesn't seem to work. Please Help ! Clownfish --------------------------------------------------------------------- Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
timestamp(14) fails to change on load data infile
Clownfish Internet Services - www.clown-fish.com Sun, 04 Feb 2001 08:05:05 -0800
- Re: timestamp(14) fails t... Clownfish Internet Services - www.clown-fish.com
- Re: timestamp(14) fa... Pat Sherrill
- Re: timestamp(14... Clownfish Internet Services - www.clown-fish.com