[ic] Administrators by Affiliate

jojo@buchonline.net jojo@buchonline.net
Mon, 13 Nov 2000 10:10:52 +0100 (CET)


On 12 Nov, Casey R. Tweten wrote:
> Today around 8:35pm, Hans-Joachim Leidinger hammered out this masterpiece:
> 
> : "Casey R. Tweten" wrote:
> : > 
> : > example config error: Can't call method "new" on an undefined value at
> : > /home/httpd/interchange/lib/Vend/Data.pm line 576.
> : > 
> : > What am I missing?
> : 
> : I've gotten this same error often, when my setting of my new table is
> : wrong in my catalog.cfg or the file <mynewfile.mdb> (Attention! I write
> : this from my head!) is wrong. Post your part of your setting. Without a
> : crytalball, it is hard to help you.
> 
> I am using MySQL so this is the catalog.cfg section for it:
> 
> #####
> ##### MySQL
> #####
> #ifdef MYSQL
> 
> Message Using MySQL, DSN=__SQLDSN__.
> 
> # Tell the default DBM we are using something else...
> Variable  SOME_DATABASE  1
> 
> # Uncomment if needed
> #Variable  SQLUSER  foo
> #Variable  SQLPASS  bar
> 
> # The table defs are in separate files in the dbconf/mysql directory,
> # the ones kept in DBM are in TABLENAME.dbm files.
> 
> #include dbconf/mysql/*
> 
> #endif
> 
> ------------>8 Snip the other DB config sections... 8<------------
> 
> #####
> ##### Default DBM if nothing else defined
> #####
> #ifndef SOME_DATABASE
> 
> # The table defs are in separate files in the dbconf/dbm directory.
> 
> Message Using default DBM database.
> #include dbconf/default_db/*
> 
> #endif
> 
> #ProductFiles   products
> ProductFiles   products products2
> 
> ###################################################
> 
> That's my catalog.cfg section in question.
> 

Hmmm...have you

..../dbconf/mysql/products2.sql like

------------snip---------
# MiniVend database definition
Database  products2  products2.txt __SQLDSN__
#ifdef SQLUSER
Database  products2  USER         __SQLUSER__
#endif
#ifdef SQLPASS
Database  products2  PASS         __SQLPASS__
#endif
Database  products2  KEY          sku
Database  products2  COLUMN_DEF   "sku=char(14) NOT NULL PRIMARY KEY"
Database  products2  COLUMN_DEF   "description=VARCHAR(128) NOT NULL"
Database  products2  COLUMN_DEF   "title=VARCHAR(128) DEFAULT '' NOT NULL, index(title)"
Database  products2  COLUMN_DEF   "template_page=VARCHAR(64)"
Database  products2  COLUMN_DEF   "comment=TEXT"
Database  products2  COLUMN_DEF   "display=VARCHAR(128)"
Database  products2  COLUMN_DEF   "image=VARCHAR(64)"
Database  products2  COLUMN_DEF   "price=DECIMAL(12,2) NOT NULL, index(price)"
Database  products2  COLUMN_DEF   "category=VARCHAR(64) NOT NULL, index(category)"
Database  products2  COLUMN_DEF   "nontaxable=CHAR(3)"
Database  products2  COLUMN_DEF   "weight=VARCHAR(12) DEFAULT '0' NOT NULL"
Database  products2  COLUMN_DEF   "size=VARCHAR(96)"
Database  products2  COLUMN_DEF   "color=VARCHAR(96)"
Database  products2  COLUMN_DEF   "gift_cert=VARCHAR(3)"
Database  products2  COLUMN_DEF   "related=text"
Database  products2  COLUMN_DEF   "featured=VARCHAR(32)"
Database  products2  NUMERIC      price
------------snip---------

and perhaps in your catalog.cfg

------------snip---------
NoImport products products2

# or use
# NoImportExternal Yes
------------snip--------- 

? Is the next codes

[data table="products2" column="sku" key="<any sku>"]

working for you?

Did you remove all ...products/<anyfile>.sql and restart your IC Server?

Joachim



-- 
Hans-Joachim Leidinger
buch online                 jojo@buchonline.net
Munscheidstr. 14            FAX: +49 209 1671441
45886 Gelsenkirchen         FAX: 0209 1671441