[Zope] RE: [Zope]How to insert data with ZfirebirdDB ?

Ivan Franinovic ivan.franinovic@vsr.si
Mon, 17 Jun 2002 16:44:41 +0200


Hi!

I also upgraded the kinterbasDB-3.0 to 3.1 and zope doesn't restart anymore,
but I still get no new data in the table.
There is no problem with inserting data using python script:
+++++++++++++++++++++++++++++++
import kinterbasdb

con = kinterbasdb.connect(
        dsn="192.168.1.15:/dbase/sport2.gdb",
        user="if",
        password="gomboc" )
cur = con.cursor() # Get a Cursor object that operates in the context of
                   # Connection con.
novaomr = (
        ('042' , 'krneki'),
        ('666' , 'satan')   )
for novastev in novaomr:
    cur.execute("insert into omreznaskupina (STEVOMREZJ,IMEOMREZNE) values
(?, ?
)", novastev)
con.commit() # The changes will not be saved unless the transaction is
             # committed explicitly.
cur = con.cursor()
cur.execute("select * from omreznaskupina") # Execute the SELECT statement.
print cur.fetchall() # Retrieve all rows as a sequence, then print that
sequence
++++++++++++++++++++++++++++++++++++++++++++++
But a simple ZSQL method:
insert into omreznaskupina (STEVOMREZJ,IMEOMREZNE) values (
<dtml-sqlvar stevomrezj type="string">,
<dtml-sqlvar imeomrezne type="string">
)
returns
This statement returned no results. (its not ment to)
and inserts no new data!

IS THERE SOME OTHER WAY TO INSERT DATA WITH ZfirebirdDA an kinterbasDA using
Z SQL Method?

Ivan








-----Original Message-----
From: zope-admin@zope.org [mailto:zope-admin@zope.org]On Behalf Of Jens
Vagelpohl
Sent: Saturday, June 15, 2002 5:17 PM
To: Ivan Franinovic
Cc: Jon R. Nials; zope@zope.org
Subject: Re: [Zope] pcgi error while inserting data into db


it looks like your zope crashes. start it with the environment variable
"STUPID_LOG_FILE=/path/to/file" set and examine that log file after
testing again. you will see if zope did indeed restart.

i suggest, as a general measure, to upgrade to zope 2.5.1 and python 2.1.3.
  the combination you are running has various crash-bugs that are fixed in
python 2.1.3 and zope 2.5.1.

jens


On Saturday, June 15, 2002, at 07:48 , Ivan Franinovic wrote:

> Thanks John!
>
> With this email I was just trying to get some ping from the mail list.
> This
> is my second email. The email is send before this one was field with more
> detail but I had no answer.
>
> I set up the testing environment with zope, firebird, Zfirebirddb and
> kinterbasedb on linux redhat:
>
>
> Zope Version 	(Zope 2.4.3 (source release, python 2.1, linux2), python
> 2.1.1, linux2)
> Python Version 	2.1.1 (#1, Aug 13 2001, 19:37:40) [GCC 2.96 20000731 (Red
> Hat Linux 7.1 2.96-96)]
> System Platform 	linux2
>
> I pumped  a database from acces to firebird and I fond no big problem
> browsing it.
> When I’m trying to
>
> insert into omreznaskupina (STEVOMREZJ, IMEOMREZNE) values ('666','satan'
> );
>
> with Z SQL method I get
>
> ! 	Temporarily Unavailable The resource you requested is temporarily
> unavailable - please try again later.
> C-Runtime errno:
> Success
> PCGI Error:
> (116) unable to connect, path=/var/run/pcgi.soc, fd=5
> Explanation:
> I get the same error when I’m trying to restart zope from ControlPanel.
>
> ANY IDEA WHAT CAUSES THESE ERRORS OR HOW CAN I TRACK THAT KIND OF ERRORS?
> ???
>
>
> Thanks to ALL!
>
> Ivan
>
>
>
>
>
>
>
>
>
> --------------------------------------------------------------------------
--
> --------------------------------------------------------------------------
--
> -----------------------
> -----Original Message-----
> From: jnials@server.thanesoft.net [mailto:jnials@server.thanesoft.net]On
> Behalf Of Jon R. Nials
> Sent: Friday, June 14, 2002 5:33 PM
> To: Ivan Franinović
> Subject: Re: [Zope] Is there anyone who can help?
>
>
> Ivan Franinović wrote:
>>
>> Hi !
>>
>> I'm new on the list and I'm also new in zope. It is also my first time
>> trying to get help from any mailing list.
>> I'm trying to set up a dynamic page using zope and firebird and I'm
>> stuck!
>> So far I managed to set-up everything by my self.
>> I get pcgi error when I'm trying to insert simple data into table.
>>
>> Is there anyone who can help?
>>
>
>
> Some suggestions for getting help.  There's not enough info here to help
> you, so you might want to post the code you are using to insert the
> data.  You probably also want to post the results of a show table so
> folks can see the table you are trying to insert into.
>
> -Jon



_______________________________________________
Zope maillist  -  Zope@zope.org
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists -
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )