hii
this is how we can do
<?xml version="I.0" ?>
<!DOCTYPE hibernate-configuration PUBLIC
"-//Hibernate/Hibernate Configuration DTD 2.0//EN"
http://hibernate.sourceforge.net/hibernate-configuration-2.0.dtd> <hibernate-configuration>
<session-factory>
<property name="connection.driver class">
com.microsoft.jdbc.Driver</property> <property name="connection.url">
jdbc.Microsoft://localhost/products</property> <property
name="username">sa</property>
<property name="password">sa</property>
</session-factory>
</hibernate-configuration>
code is like this
this for mysql database Configuration configuration = new ConfigurationO.addClass(classname);
SessionFactory mysqlSession = configuration.buildSessionFactoryQ;
for sql database server configuration = new Configuration().
configure("sglserver.cfg.xml").addClass(Class Name);
SessionFactory sqlserverSession = configuration.buildSessionFactoryO;