[Zope-dev] Z SQl Method (Newbie)

Alexander Staubo alex@mop.no
Fri, 25 Jun 1999 15:00:51 +0200


Fyi, reading the Gadfly documentation first is a really good idea. It
contains information about what Gadfly is, what it supports, and how you
create databases.

What the Z Gadfly database adapter does when you open a connection in an
empty directory, is execute the following code (from db.py):

        if not path.exists(path.join(dir,connection+".gfd")):
            db=gadfly.gadfly()
            db.startup(connection,dir)

This will create a new database (the .gfd file). Creating the tables is
your job ("create table" statements in SQL).

--
Alexander Staubo             http://www.mop.no/~alex/
"What the hell, he thought, you're only young once, and threw
himself out of the window. That would at least keep the element of
surprise on his side."
--Douglas Adams, _The Hitchhiker's Guide to the Galaxy_

>-----Original Message-----
>From: zope-dev-admin@zope.org [mailto:zope-dev-admin@zope.org]On Behalf
>Of Paul Chung Chee Soong
>Sent: 25. juni 1999 14:41
>To: zope-dev@zope.org
>Subject: [Zope-dev] Z SQl Method (Newbie)
>
>
>
>I have problems with Z SQL Method in Zope 2 which was installed in a
>unix(linux) machine. I need to know the following.
>
>Create a Z Gadfly Database Connection. I created a directory
>'test' in
>Zope-2.0.0a1-src/var/gadfly and it appeared in the Data Source
>field. How
>can I access it thru SQL Method since it isn't a database at
>all (just a
>plain dir !!). Can I create a database or table via SQL Method?
>
>Do I need to link the data source with a gadfly database? If yes, how??
>
>By default, there's a demo data source. How can I use it?????
>How do I
>know what are the tables in it anyway?? Thus, I can't use the
>SQL Method.
>
>I would appreciate very much if you can reply as soon as
>possible. I need
>to use SQL Method desperately now.
>
>
>Thanks so much,
>Paul
>
>
>
>_______________________________________________
>Zope-Dev maillist  -  Zope-Dev@zope.org
>http://www.zope.org/mailman/listinfo/zope-dev
>
>(For non-developer, user-level issues, use the companion list,
>zope@zope.org, http://www.zope.org/mailman/listinfo/zope )
>