[DB-SIG] kinterbasdb Strange problem.. PLS HELP...

Vivek Kumar vivsar_guve at yahoo.co.uk
Wed May 21 04:37:32 EDT 2003


--- David Rushby <davidrushby at yahoo.com> wrote:
> --- Vivek Kumar <vivsar_guve at yahoo.co.uk> wrote:
> [about a problem connecting to Firebird via
> kinterbasdb from Apache CGI]
> > 
> > The configuration I am using...
> > Windows 2k professional
> > Python 2.2.2
> > KInterbasDB 3.0.2
> > FirebirdSQL WI-V6.2.908 Firebird 1.0
> > Apache 2.0.44
....

THX a lot david, Actually my problem was solved when I
visited the forum for the module on sourceforge but as
I wrote in my next (ie after the one in which I stated
the prob) I was confused a bit. But now, after reading
ur mail I understand the point behind working of same
code in a command line interprator. :-)

> I also noticed the following snippet in your code:
> ---
> cur.execute("""select gen_id(buyer_id_gen,1) from
> dummy""")
> rst=cur.fetchone()
> if len(rst)==0:
>    ...
> else:
>    ...
> ---
> In that code, rst will always be a tuple containing
> a single element (the
> generated id); the first clause of the if statement
> will never be executed. 
> If there's an error while generating/fetching the
> id, an exception will be
> raised.
> 
> Also, you can use the "magic" table RDB$DATABASE as
> the target in arbitrary
> select expressions, rather than establishing a dummy
> table.  Like this:
> cur.execute("select gen_id(buyer_id_gen,1) from
> rdb$database")

THX a lot more for this  :).

Kind Regards
Vivek Kumar

__________________________________
Do you Yahoo!?
The New Yahoo! Search - Faster. Easier. Bingo.
http://search.yahoo.com



More information about the DB-SIG mailing list