Re: [Dbi-interbase-devel] DBD and Interbase functionality
Status: Beta
Brought to you by:
edpratomo
From: Chris W. <ch...@cw...> - 2002-04-30 14:55:45
|
On Tue, 2002-04-30 at 01:08, Mark D. Anderson wrote: > depends on your interbase version and your dialect. > See http://www.ibphoenix.com/ibp_60_sql_date_fs.html > I use current_timestamp for my needs. > btw, another time related factoid you might need to know is that the > default time format is '%d/%m/%Y %H:%M:%S' This is good to know, thanks. > > how do you generate unique key values? > > interbase uses the term "generator" for what oracle calls "sequences". There seems to be one difference: you cannot get the "current" value from a generator. For instance, from a sequence you can do: INSERT INTO foo ( id ) VALUES ( NEXTVAL( seq ) ); SELECT CURRVAL( seq ); To insert the next ID into a table and get back the ID you just inserted. Using a generator, you need to first select the next value from the generator then stick it into the statement. This isn't difficult, but it would seem to make it difficult to use the trigger method to make this happen, since you have no way of getting the ID just inserted. > you aren't the first to see this; try google terms: interbase 504 "unknown cursor" > I don't see a resolution even though it was reported in year 2000. > > fyi i gave up on the DBI::InterBase driver last year (i just lurk on this list). > what i'm currently using is DBI:ODBC, calling the unixodbc driver manager, calling > the unixodbc interbase driver. > such an approach introduces an extra layer, but all the layers are more > mature than DBI::InterBase, and have more users. > all my mysterious bugs disappeared when i made the move. Also good to know. I'll probably just work around it -- IME ODBC installs on Unix machines aren't as common as using the client libraries directly. Thanks! Chris -- Chris Winters (ch...@cw...) Building enterprise-capable snack solutions since 1988. |