[ic] I can't seem to create new products and inventory tables...
mail
lists at gmnet.net
Thu May 10 12:03:23 EDT 2007
On Thu, 2007-05-10 at 17:52 +0200, Stefan Hornburg wrote:
> mail wrote:
> > Hi,
> >
> > I have been trying to change the products and inventory tables in my
> > catalog because I need to give another developer a clear way to upload
> > to these tables. I didn't change the Inventory table at all except that
> > I added the definition for the min_order field. It was missing in the
> > standard foundation.
> >
> > here is my modified inventory.mysql file:
> > --------------------------------------------------------------
> > Database inventory inventory.txt __SQLDSN__
> > Database inventory COLUMN_DEF "sku=char(64) NOT NULL PRIMARY KEY"
> > Database inventory COLUMN_DEF "quantity=INT(12)"
> > Database inventory NUMERIC quantity
> > Database inventory COLUMN_DEF "stock_msg=char(64)"
> > Database inventory COLUMN_DEF "account=char(64)"
> > Database inventory COLUMN_DEF "cogs_account=char(64)"
> > Database inventory COLUMN_DEF "min_order=INT(12)"
> > Database inventory NUMERIC min_order
> > --------------------------------------------------------------
> >
> > and here is my inventory.txt file:
> > --------------------------------------------------------------
> > sku quantity stock_message account cogs_account
> > min_order
> > 001 1000 In stock
> > --------------------------------------------------------------
> >
> > I needed to clearly defign all the products fields and I added some for
> > this catalog.
> >
> > here is my products.mysql file:
> > --------------------------------------------------------------
> > Database products products.txt __SQLDSN__
> > Database products KEY sku
> > Database products HIDE_FIELD inactive
> > Database products COLUMN_DEF "sku=char(64) NOT NULL PRIMARY KEY"
> > Database products COLUMN_DEF "title=varchar(128) DEFAULT '' NOT
> > NULL"
> > Database products INDEX title
> > Database products COLUMN_DEF "description=varchar(128) NOT NULL"
> > Database products INDEX description
> > Database products COLUMN_DEF "serial_number=varchar(128)"
> > Database products COLUMN_DEF "metakeywords=varchar(128) NOT NULL
> > DEFAULT ''"
> > Database products COLUMN_DEF "metadescription=varchar(128) NOT NULL
> > DEFAULT ''"
> > Database products COLUMN_DEF "comment=TEXT"
> > Database products COLUMN_DEF "thumb=varchar(128)"
> > Database products COLUMN_DEF "image=varchar(128)"
> > Database products COLUMN_DEF "image_large=varchar(128)"
> > Database products COLUMN_DEF "template_page=varchar(64)"
> > Database products COLUMN_DEF "url=varchar(128)"
> > Database products COLUMN_DEF "price=DECIMAL(12,2) NOT NULL"
> > Database products NUMERIC price
> > Database products INDEX price
> > Database products COLUMN_DEF "sale_price=DECIMAL(12,2)"
> > Database products NUMERIC sale_price
> > Database products COLUMN_DEF "wholesale=DECIMAL(12,2)"
> > Database products NUMERIC wholesale
> > Database products COLUMN_DEF "cost=DECIMAL(12,2)"
> > Database products NUMERIC cost
> > Database products COLUMN_DEF "prod_group=varchar(64) NOT NULL
> > DEFAULT ''"
> > Database products INDEX prod_group
> > Database products COLUMN_DEF "category=varchar(64) NOT NULL DEFAULT
> > ''"
> > Database products INDEX category
> > Database products COLUMN_DEF "tax_category=varchar(128) NOT NULL
> > DEFAULT ''"
> > Database products COLUMN_DEF "nontaxable=CHAR(3)"
> > Database products COLUMN_DEF "option_type=varchar(128)"
> > Database products COLUMN_DEF "author=varchar(255)"
> > Database products COLUMN_DEF "related=text"
> > Database products COLUMN_DEF "featured=varchar(32)"
> > Database products COLUMN_DEF "weight=varchar(12) DEFAULT '0' NOT
> > NULL"
> > Database products COLUMN_DEF "gift_cert=tinyint(1) DEFAULT ''"
> > Database products COLUMN_DEF "donation=tinyint(1) DEFAULT ''"
> > Database products COLUMN_DEF "download=tinyint(1) DEFAULT ''"
> > Database products COLUMN_DEF "dl_type=varchar(128)"
> > Database products COLUMN_DEF "dl_location=varchar(128)"
> > Database products COLUMN_DEF "nla=tinyint(1) DEFAULT ''"
> > Database products COLUMN_DEF "inactive=tinyint(1) DEFAULT ''"
> > --------------------------------------------------------------
> >
> > here is my products.txt file:
> > --------------------------------------------------------------
> > sku title description serial_number metakeywords
> > metadescription comment thumb image i
> > mage_large template_page url price sale_price
> > wholesale cost prod_group c
> > ategory tax_category nontaxable option_type author related
> > featured weight gift_cert
> > donation download dl_type dl_location nla
> > inactive
> > 001 test testdescrip 1000001 keywordstest descriptiontest
> > comment test.gif test2.gif
> > 18.99 14.00 8.00 Tools
> > testcategory 1
> > 2 0 0 0
> > 0 0
> > --------------------------------------------------------------
> >
> > Of course this email will wrap and change the configuration of the tabs
> > etc.. but the tabs are right in my files.
> >
> > Now when I restart IC, I get the following errors...
> >
> > --------------------------------------------------------------
> > Configuring catalog ppsdemo...Using MySQL,
> > DSN=dbi:mysql:ppsicdemo...table products created: create table products
> > (
> > sku char(64) NOT NULL PRIMARY KEY,
> > title varchar(128) DEFAULT '' NOT NULL,
> > description varchar(128) NOT NULL,
> > serial_number varchar(128),
> > metakeywords varchar(128) NOT NULL DEFAULT '',
> > metadescription varchar(128) NOT NULL DEFAULT '',
> > comment TEXT,
> > thumb varchar(128),
> > image varchar(128),
> > image_large varchar(128),
> > template_page varchar(64),
> > url varchar(128),
> > price DECIMAL(12,2) NOT NULL,
> > sale_price DECIMAL(12,2),
> > wholesale DECIMAL(12,2),
> > cost DECIMAL(12,2),
> > prod_group varchar(64) NOT NULL DEFAULT '',
> > category varchar(64) NOT NULL DEFAULT '',
> > tax_category varchar(128) NOT NULL DEFAULT '',
> > nontaxable CHAR(3),
> > option_type varchar(128),
> > author varchar(255),
> > related text,
> > featured varchar(32),
> > weight varchar(12) DEFAULT '0' NOT NULL,
> > gift_cert tinyint(1) DEFAULT '',
> > donation tinyint(1) DEFAULT '',
> > download tinyint(1) DEFAULT '',
> > dl_type varchar(128),
> > dl_location varchar(128),
> > nla tinyint(1) DEFAULT '',
> > inactive tinyint(1) DEFAULT ''
> > )
> >
> > set_row error on key '001': You have an error in your SQL syntax near '
> > 14.00, 8.00, 'Tools', 'testcategory', '', '1', '', '', '', '', '2', '0',
> > '0', '' at line 1
> > table 'products' failed: products import into failed: set_row error on
> > key '001': You have an error in your SQL syntax near ' 14.00, 8.00,
> > 'Tools', 'testcategory', '', '1', '', '', '', '', '2', '0', '0', '' at
> > line 1 at /usr/local/interchange-5.4.0/lib/Vend/Table/DBI.pm line 1393.
>
> How does the corresponding line in your products.txt look like ?
>
> Bye
> Racke
>
Thanks,
that is the first row, and it looks fine. I even deleted all other rows.
I have a new products.txt file at http://icdemo.petalpoweredsoftware.com
and I still get the same error. I exported my .txt files from open
office calc.
rick
More information about the interchange-users
mailing list