Path: news.cs.au.dk!noatun.mjolner.dk!mail-to-news From: Atle Newsgroups: comp.lang.beta Subject: Re: Containers Date: Tue, 21 Nov 2000 18:59:31 +0100 Organization: Posted to comp.lang.beta by a mailtonews script Lines: 75 Sender: lbr@mjolner.dk Approved: mailtonews@cs.au.dk Message-ID: <8vea6q$73f79$1@gjallar.cs.au.dk> References: <3A0FF466.94021F55@skynet.be> NNTP-Posting-Host: bifrost.mjolner.dk Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Trace: gjallar.cs.au.dk 974826522 7453929 130.225.4.254 (21 Nov 2000 17:08:42 GMT) X-Complaints-To: usenet@cs.au.dk NNTP-Posting-Date: Tue, 21 Nov 2000 17:08:42 +0000 (UTC) Mailing-List: contact usergroup-help@mjolner.dk; run by ezmlm X-No-Archive: yes X-Mailer: Mozilla 4.72 [en] (X11; U; Linux 2.2.14 i686) X-Accept-Language: en X-Original-Message-ID: <3A1AB803.2D7A8A31@skynet.be> X-Original-Sender: atle@skynet.be Xref: news.cs.au.dk comp.lang.beta:12645 Atle wrote: > > > Could one of you quickly give me an eaxmple of how to use a generic container for this? You probably noticed the nonsense in the above - that is why I didn't get a response to this. What I wanted, was of course a way to store this on disk as if I was using some sort of container, in the mean time I have been using set and multiset for manipulating this in memory. I have also gotten as far as to figure out how I would go about using PostGreSQL with Beta to store the stuff on disk. Or rather, I *think* I have figured it out. This is (still :) my object Symptom: (# ID: @INTEGER; Description: @TEXT #); I now want a connection to PostGreSQL (# sqlCon: @Connection; stmt: @sqlCon.directSqlStatement; ('Atle','hakka','møkk')->sqlCon.open; (* And now, the real deal *) (* Here I guess I need to work with IntegerObject and use ID[] and value[] ?? *) 'ID'->sqlCon.declateInteger (# set::(# DO value->ID #) ; get::(# DO ID->value #) #); 'Description'->sqlCon.declateText (# set::(# DO value->Description #) ; get::(# DO Description->value #) #); And now be able to happily create a SYMPTOM table and store and retrieve values. The whole thing sort of stops before it starts since I try various forms of ORIGIN '~beta/betadbc'; INCLUDE '~beta/this/and/that'; and switch around ORIGIN, INCLUDE and stuff to be able to get to a file called /usr/local/lib/libiodbc.so that ld cannot find. Before I hunt for this file, copy it to /usr/local/lib and potentially muck up the whole Beta installation, is there something I should know? This is the first time something has not worked 'as expected' - which leads me to suspect my understanding of things, rather than the wisdom of the Beta system (a sensible approach :-) SO: Is there something I can read except MIA 99-43: The BetaDBC Library that will explain how to set up the connection between PostGreSQL and Beta? I should maybe add that I have set up PostGreSQL to work with PSQL, and I have created tables with SQL statements from the PSQL interpreter ... I don't know if that is relevant ...? Yet again many thanks for excellent work. I believe in pattern-oriented programming. If I get this to work, I will (eventually) have an application to prove it ... Atle