[ic] Custom Database defaulting to gdbm (Sql-Ledger)
Sam Batschelet
batschelet at exactasphere.com
Sat Nov 1 16:35:30 EST 2003
> Hi List,
>
> I have a small database that I am trying to integrate with a 3rd party
> accounting system (Sql-Ledger). The scripts seems to be working fine as
the
> database is populated but here is my problem its in the wrong format the
> database is defaulting to .gdbm.
>
> So my question is how do I get this database to connect to the pgsql.
Right
> now it is defaulting to the default database gdbm so I must be missing a
> flag somewhere to have the database written to sql instead of dbm,
shouldn't
> having the customer.pgsql file setup alleviate that? Any help on this
would
> be great.
>
> Thanks,
>
> Sam Batschelet
> System Engineer
> ExactaSphere Inc
Ok I have isolated the problem I think......when I restart intrechange now I
get an error DBI.pm error. This is after I have removed the customer
database and I'm trying to get interchange to rebuild it.
Configuring catalog ledger...Using PostgreSQL,
DSN=dbi:Pg:dbname=databasename...table 'customer' failed: DBD::Pg::db do
failed: ERROR: parser: parse error at or near ")" at character 37 at
/usr/local/interchange/lib/Vend/Table/DBI.pm line 469. Looking at the code
it doesn't like the format of my customer.pgsql file....I think :)
I adjusted my customer.pgsql and combined the sql-ledger database and the
interchange database so thaey are the same, and they both use the same user
and pass. Now there must be something in here that interchange doesn't like
but I can't put a finger on it.
ifdef SQLUSER
Database customer USER __SQLUSER__
endif
ifdef SQLPASS
Database customer PASS __SQLPASS__
endif
Database customer DEFAULT_TYPE VARCHAR(255)
Database customer COLUMN_DEF "id=int(20) NOT NULL PRIMARY KEY"
Database customer COLUMN_DEF "name=VARCHAR(35)"
Database customer COLUMN_DEF "addr1=VARCHAR(35)"
Database customer COLUMN_DEF "addr2=VARCHAR(35)"
Database customer COLUMN_DEF "addr3=VARCHAR(35)"
Database customer COLUMN_DEF "addr4=VARCHAR(35)"
Database customer COLUMN_DEF "contact=VARCHAR(35)"
Database customer COLUMN_DEF "phone=VARCHAR(20)"
Database customer COLUMN_DEF "fax=VARCHAR(20)"
Database customer COLUMN_DEF "email=TEXT"
Database customer COLUMN_DEF "notes=TEXT"
Database customer COLUMN_DEF "discounts=REAL"
Database customer COLUMN_DEF "taxincluded=boolean"
Database customer COLUMN_DEF "creditlimit=double precision "
Database customer COLUMN_DEF "terms=smallint"
Database customer COLUMN_DEF "shiptoname=VARCHAR(35)"
Database customer COLUMN_DEF "shiptoaddr1=VARCHAR(35)"
Database customer COLUMN_DEF "shiptoaddr2=VARCHAR(35)"
Database customer COLUMN_DEF "shiptoaddr3=VARCHAR(35)"
Database customer COLUMN_DEF "shiptoaddr4=VARCHAR(35)"
Database customer COLUMN_DEF "shiptocontact=VARCHAR(20)"
Database customer COLUMN_DEF "shiptophone=VARCHAR(20)"
Database customer COLUMN_DEF "shiptofax=VARCHAR(20)"
Database customer COLUMN_DEF "shiptoemail=TEXT"
Database customer DEFAULT "id=nextval('id'::text)"
Database customer DEFAULT "creditlimit='0'"
Database customer DEFAULT "terms='0'"
Thanks,
Sam Batschelet
Systems Engineer
ExactaSphere Inc.
More information about the interchange-users
mailing list