Icon View Thread

The following is the text of the current message along with any replies.
Messages 1 to 6 of 6 total
Thread DBISAM ODBC and NHibernate
Wed, Oct 10 2007 11:27 PMPermanent Link

Grant Stone
Does anyone have any experience in using the DBISAM ODBC driver with NHibernate?

I'm having no problem reading data, but cannot get inserts or updates to work.  This is a
legacy database with autogenerated keys, and NHibernate seems to be creating SQL that
DBISAM doesn't like.
I think the problem could be configuration related - I'm using the dialect
NHibernate.Dialect.GenericDialect.  

The SQL generated by NHibernate is:
UPDATE Event SET NUM = ?, EventId = ?, EventDate = ?, EventValue = ?, IsEventTimed = ?
WHERE EventId = ?; p0 = '64', p1 = '6074', p2 = '27/09/2007 12:00:00 a.m.', p3 = '', p4 =
'True', p5 = '6'

The error I'm getting is:
{"ERROR [42000] [Elevate Software][DBISAM] DBISAM Engine Error # 11949 SQL parsing error -
Expected NULL, FixedChar, GUID, String, Memo, or BLOB expression but instead found ? in
UPDATE SQL statement at line 1, column 40"}

So obviously it's the way those parameters are being set that's the problem.  Is there
anyone out there who has DBISAM working with NHibernate who could help?

Thanks

Grant
Thu, Oct 11 2007 12:59 PMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com

Grant,

<< Does anyone have any experience in using the DBISAM ODBC driver with
NHibernate?

I'm having no problem reading data, but cannot get inserts or updates to
work.  This is a legacy database with autogenerated keys, and NHibernate
seems to be creating SQL that DBISAM doesn't like.
I think the problem could be configuration related - I'm using the dialect
NHibernate.Dialect.GenericDialect.  >>

What are the other Dialect options ?  I see a couple of issues with the SQL
generated, primarily the date format is incorrect.  I suspect that there is
an issue with the way that the parameters are being specified also.

--
Tim Young
Elevate Software
www.elevatesoft.com

Tue, Oct 16 2007 2:56 AMPermanent Link

Grant Stone
Tim,
Besides the generic dialect, these are also supported.


RDBMS            Dialect
DB2              NHibernate.Dialect.DB2Dialect
PostgreSQL   NHibernate.Dialect.PostgreSQLDialect
MySQL            NHibernate.Dialect.MySQLDialect
Oracle (any version)   NHibernate.Dialect.OracleDialect
Oracle 9/10g   NHibernate.Dialect.Oracle9Dialect
Sybase             NHibernate.Dialect.SybaseDialect
Microsoft SQL Server 2000   NHibernate.Dialect.MsSql2000Dialect
Microsoft SQL Server 7   NHibernate.Dialect.MsSql7Dialect
Firebird      NHibernate.Dialect.FirebirdDialect
SQLite             NHibernate.Dialect.SQLiteDialect


Tue, Oct 16 2007 2:28 PMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com

Grant,

<< Besides the generic dialect, these are also supported. >>

Hmmm, none of those will be any better.  Do you happen to know if the
dialects are user-extensible or not ?

--
Tim Young
Elevate Software
www.elevatesoft.com

Wed, Oct 17 2007 5:41 AMPermanent Link

Grant Stone
They are user-extensible.  I might have a look at writing one when I'm back at work next week.

Grant
Thu, Oct 18 2007 2:08 PMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com

Grant,

<< They are user-extensible.  I might have a look at writing one when I'm
back at work next week. >>

They really need one for stock-standard SQL 2003 that includes proper date
and time formatting.  I'm no Java programmer, but if you need help with this
please let me know and I'll give you any information that you need.

--
Tim Young
Elevate Software
www.elevatesoft.com

Image