[ic] Problems importing new products.txt

Marty Tennison interchange-users@interchange.redhat.com
Tue Apr 30 18:12:00 2002


On Tue, 2002-04-30 at 14:14, Michael Bevan wrote:
> Hi all,
> 
> I'm running IC 4.8.3 with MySQL as my database of
> choice. Everything has been behaving fine, but I am
> now
> experiencing wierdness with products.txt though. 
> 
> Since changing my data entry format for the sku field
> from '0111-Hot Product' to '0111-Hot-Product' - I keep
> getting the following error upon import of my product
> table: 
> 
> FATAL error 
> 
> DBD::mysql::db do failed: Duplicate entry '0198-1356'
> for key 1 at
> /usr/lib/interchange/lib/Vend/Table/DBI.pm line 1042,
> line 2. 
> 
> Progress to date: 
> 
> Using fields from file: 'sku description title
> template_page comment thumb image image_large price
> sale_price wholesale prod_group category 
> nontaxable weight size color gift_cert related
> featured download dl_type dl_location inactive' 
> 
> I know my data is clean, because I can import this
> file with no errors into the IC Demo at redhat.com. It
> seems
> to like it.
> 
> Furthermore, I can't even import my options or
> inventory tables now without getting the same error. 
> 
> How do I blow out the old databases in order to
> install my new ones? I think the previous records for
> my store might be the source of my problem. 
> 
> Any ideas would be appreciated, 
> Thanks, 
> Mike 
> mkbevan@yahoo.com

Hi Mike,

If you can get to an sql prompt you can do "drop table <table name>;"
and drop the tables before trying to import them.  If you do not have
drop privilages you can do "delete from <table name>;" and erase all the
contents but leave the table in place.