• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

jforum with interbase6

 
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
How can I integrate jforum with interbase6 (+ firebird interclient) ?

Should I extend some class and take care of the sql dialect?

[originally posted on jforum.net by Anonymous]
 
Migrated From Jforum.net
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
rafael has written a how-to in the following posting


https://coderanch.com/t/574636
[originally posted on jforum.net by marc]
 
Migrated From Jforum.net
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Ok.
One question: they speak about an isolation problem generating new key.
And then rafael says that it could be solved synchornizing some piece of code.
What are these problems?
I mean rafael say also that he ensures that there is the same connection between an INSERT and a "SELECT last_insert_id", so I thought last_insert_id should return the right id!
where is the problem instead?

(porting to firebird will not be so immediate because i found some interbase keywords in column names!).
[originally posted on jforum.net by Anonymous]
 
Migrated From Jforum.net
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Ok.
One question: they speak about an isolation problem generating new key.
And then rafael says that it could be solved synchornizing some piece of code.
What are these problems?

I mean rafael say also that he ensures that there is the same connection between an INSERT and a "SELECT last_insert_id", so I thought last_insert_id should return the right id!
where is the problem instead?



In mysql / firebird this is unlike to happen, but in other databases, like oracle and postgresql, where you should make another query to get the last id, there is a possibility to another insertion occur before you finish the call to the sequence.


(porting to firebird will not be so immediate because i found some interbase keywords in column names!).



Really? which one?

Rafael
[originally posted on jforum.net by Rafael Steil]
 
Migrated From Jforum.net
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator


Uhm...i have organized firebird so: i have my generators and triggers that call generators before inserting a row in the table.Then i need a select to retrieve the generated id ("gen_id(generator, 0)") and pass it to the objects anyway!I think i need a transaction to keep safe the code from the insert to the select. Is it correct?



Yep. Enabling transactions it may work. Anyway, the probablity of an error occur related to this subject is very low. In future versions of jforum we want to have this improved, but until there, there isn't much to worry about.


i found column named "time" and "type".



Oh, I see. Currently, you can workaround this issue by simple using another column name and then overriding the method that works with this columns. It will work fine. We can update the database structure, but I'm not sure if in time to the next release..

Rafael

[originally posted on jforum.net by Anonymous]
 
Migrated From Jforum.net
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Damn.. sorry about the message before this one. I was editing your message to correct a bbcode and end modifying the entire message, thinking I was writing an answer

I am so going to sleep now.

Rafael
[originally posted on jforum.net by Rafael Steil]
 
Migrated From Jforum.net
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Ok, I fixed the table column's names. Here is :

:arrow: jforum_search_results / jforum_search_topics
"time" became "search_time"

:arrow: jforum_roles
"type" became '"role_type"

:arrow: jforum_role_values
"type" became "role_type"
"value" became "role_value"

Rafael
[originally posted on jforum.net by Rafael Steil]
 
Migrated From Jforum.net
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I have found a column named "value" too.
thanks a lot for your answers!
[originally posted on jforum.net by Anonymous]
reply
    Bookmark Topic Watch Topic
  • New Topic