PDA

View Full Version : Spring NHibernate Dialect



efren.casillas
01-10-2008, 03:38 PM
Hi Everyone,
Does anybody know which dialect I have to use for Informix?

Thank you

Erich Eichinger
01-11-2008, 11:14 PM
Hi,

According to google (http://www.google.at/search?q=nhibernate+informix+dialect), it seems there is no official Informix dialect for NHibernate available yet.

cheers,
Erich

efren.casillas
01-16-2008, 05:10 PM
Thank you for your reply, OK, but I can't do a odbc connection for acomplished my goal and if so how can i define a odbc connection on nhibernate?

thank you

Erich Eichinger
01-16-2008, 05:24 PM
Hi,

did you ask on the nhibernate forums / mailinglist? I think those places are better suited to get your question answered. But we'd be glad if you shared your solution with us once you find it.

cheers,
Erich

Mark Pollack
01-17-2008, 02:26 PM
Hi Efren,

I see in the NH 1.2.1 distribution the class NHibernate.Dialect.InformixDialect. That would mean the configuration is something along the lines listed here (http://www.hibernate.org/361.html#A7). An example of using Spring and the odbc driver is here (http://forum.springframework.net/showthread.php?p=10459) (for sybase dialect). All you would have to do is put in the appropriate connection string and change the dialect. For the connection string, a good reference (aside from the informix docs themselves) is connectionstrings.com. See this link (http://www.connectionstrings.com/?carrier=informix). Hope this helps.

Cheers,
Mark

efren.casillas
01-17-2008, 11:32 PM
Hi Mark,
Thank you for your response, but in the spring distribution doesn't have the NHibernate 1.2.* or am i wrong ? so I can't use it or how can i integrate the new hibernate distribution to the spring current version.

Thank you very much for your time

Best Regards

Mark Pollack
01-18-2008, 04:12 PM
Hi Efren,

The Spring 1.1 GA distribution includes NH 1.2.0 which also has the NHibernate.Dialect.Informix class, so you should be good to go. The dll is sitting in the directory lib\NHibernate12\net\2.0. It was an oversight not to include 1.2.1 in the Spring 1.1 distribution and will be fixed in the Spring 1.1.1 release. You can still use the 1.2.1 NH dll but will need to provide an assembly redirect (http://msdn2.microsoft.com/en-us/library/7wd6ex19.aspx) in your app.config or machine.config.



<dependentAssembly>
<assemblyIdentity name="NHibernate"
publicKeyToken="aa95f207798dfdb4"
culture="neutral"/>
<bindingRedirect oldVersion="0.0.0.0-65535.65535.65535.65535"
newVersion="1.2.1.4000"/>
</dependentAssembly>


Cheers,
Mark