Subject Re:
Author Aurimas Tutinas
Ok. I have installed firebird V2.0. I open isql tool to create a database. I write then "CREATE DATABASE C:/db/notebook.fdb user admin password admin" and nothing happens. How should i correctly create a db, and maybe there's some GUI tool for creating and editing firebird database? After that, I have web app done. Working with hsql DB. And there's everything simple.

i have jdbc properties file:

jdbc.username=sa
jdbc.password=
jdbc.url=jdbc:hsqldb:file:/C:/Program Files/Apache Software Foundation/Tomcat 6.0/webapps/springapp/WEB-INF/classes/data/timexdb

i have servlet.xml file with such bean:

<bean id="dataSource"
class="org.springframework.jdbc.datasource.DriverManagerDataSource">
<property name="driverClassName" value="org.hsqldb.jdbcDriver" />
<!--property name="url" value="jdbc:hsqldb:hsql://localhost:9005/timex" /-->
<property name="url" value="${jdbc.url}" />
<property name="username" value="${jdbc.username}"/>
<property name="password" value="${jdbc.password}"/>
</bean>

<bean id="entityManagerFactory"
class="org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean" >
<property name="dataSource" ref="dataSource" />
<property name="jpaVendorAdapter">
<bean
class="org.springframework.orm.jpa.vendor.HibernateJpaVendorAdapter">
<property name="database" value="HSQL" />
<property name="showSql" value="true" />
</bean>
</property>
</bean>

and i have such code, in DAO classes to comunicate with DB using entityManager:

private EntityManager em;

@PersistenceContext
public void setEntityManager(EntityManager em) {
this.em = em;
}

public EntityManager getEntityManager() {
return this.em;
}
public void saveNote(Note note) {
em.merge(note);
}

public List getNotes(String addedby) {
return em.createQuery(
"select t from Note t where t.addedby = ?1 ORDER BY t.title").setParameter(1,
addedby)
.getResultList();
}

And i wanna know, if using firebird DB all these things will be working or i have to rewrite all my program.

But first of all i wanna know how to create a database corectly. Thanks. I think now i am more specific.




[Non-text portions of this message have been removed]