[ic] Custom Database defaulting to gdbm (Sql-Ledger)
Sam Batschelet
batschelet at exactasphere.com
Sat Nov 1 13:46:18 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.
In CATROOT/products I have a file customer.txt in that file I have the
tabbed headers for the database:
id name addr1 addr2 addr3 addr4 contact phone fax email notes discount
taxincluded creditlimit terms customernumber cc bcc
-rw-rw---- 1 interch interch 12411 Nov 1 13:17 customer.gdbm
-rw-rw-rw- 1 interch interch 123 Nov 1 13:14 customer.txt
In CATROOT/dbconf/pgsql I have a file customer.pgsql
Database customer customer.txt "dbi:Pg:dbname=accountingsystemdatabase",
"postgres", "password"
Database customer COLUMN_DEF "id=VARCHAR(20)"
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=TEXT"
Database customer DEFAULT "creditlimit='0'"
Database customer COLUMN_DEF "terms=TEXT"
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"
My catalog.cfg is setup accounting to mike heins very generous post with a
few small mods in the connection
Variable TRANSACTION_ACCOUNTING_SYSTEM 1
Accounting sql-ledger Class Vend::Accounting::SQL_Ledger
Accounting sql-ledger link_table customer
Accounting sql-ledger base_url http://xxx.xxx.xxx.xxx/sql-ledger
Accounting sql-ledger assign_username 0
Accounting sql-ledger inv_counter products:invno
Accounting sql-ledger username accountingsystemuser
Accounting sql-ledger password xxxxxxxxx
Accounting sql-ledger <<EOR
countrycode US
company ExactaSphere
currency usd
dateformat mm-dd-yy
dbconnect "dbi:Pg:dbname=accountingsystemdatabase", "postgres",
"password"
# dbconnect dbi:Pg:dbname=accountingsystemdatabase
dbdriver Pg
dbname accountingsystemdatabase
dboptions "set DateStyle to \'POSTGRES, US\'"
dbuser apache
email batschelet at exactasphere.com
name "Sam Batschelet"
numberformat "1,000.00"
printer lp
signature "Just Testing"
EOR
NoImport customer
Database customer customer.txt "dbi:Pg:dbname=exactasphere", "postgres",
"s1a2mayfly"
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.
PS I did half ass the COLUMN_DEF on a few fields just to see if it would
work, if you think that this may be a cause I will do my work and make them
right.
Thanks,
Sam Batschelet
System Engineer
ExactaSphere Inc
More information about the interchange-users
mailing list