DB2 driver for 3.1 doesn't seem to work

Posts   
 
    
wtijsma
User
Posts: 252
Joined: 18-Apr-2006
# Posted on: 29-Nov-2012 16:32:22   

Hi,

I've just installed the latest 3.1 runtime assemblies for a project, but the DB2 driver seems to generate wrong queries for every query:


SELECT
     "LPLA_1"."KENTEKEN" AS "Kenteken",
     "LPLA_1"."NUMMER_LM" AS "NummerLm" 
FROM ""SchemaName""."OBJECTEN"  "LPLA_1" 
WHERE (
     (
         (
             (
                 (
                     (
                         (
                             "LPLA_1"."DATUM_WIJZIGING" > ?)
                         OR
                             (
                                 (
                                     "LPLA_1"."DATUM_WIJZIGING" = ?)
                                 AND
                                     (
                                         "LPLA_1"."TIJD_WIJZIGING" >= ?)
                                    )
                                )
                            )
                         AND
                             (
                                 "LPLA_1"."DATUM_WIJZIGING" <= ?)
                            )
                        )
                    )
                )
            

resulting in:

WARN: 
IBM.Data.DB2.DB2Exception (0x80004005): ERROR [42601] [IBM][DB2/AIX64] SQL0104N  An unexpected token """" was found following "" AS "NummerLm" FROM".  Expected tokens may include:  "<space>".  SQLSTATE=42601

   at IBM.Data.DB2.DB2Command.ExecuteReaderObject(CommandBehavior behavior, String method, DB2CursorType reqCursorType, Boolean abortOnOptValueChg, Boolean skipDeleted, Boolean isResultSet, Int32 maxRows)
   at IBM.Data.DB2.DB2Command.ExecuteReaderObject(CommandBehavior behavior, String method)
   at IBM.Data.DB2.DB2Command.ExecuteReader(CommandBehavior behavior)
   at IBM.Data.DB2.DB2Command.ExecuteDbDataReader(CommandBehavior behavior)
   at HibernatingRhinos.Profiler.Appender.ProfiledDataAccess.ProfiledCommand.ExecuteDbDataReader(CommandBehavior behavior)

It seems like the Schema part of the table specification is wrapped in too many quotes, could I be doing something wrong?

Thanks,

Wiebe

Walaa avatar
Walaa
Support Team
Posts: 14946
Joined: 21-Aug-2005
# Posted on: 29-Nov-2012 20:55:12   

Could you try the latest release of v.3.1? or the latest of v.3.5? ref: http://www.llblgen.com/tinyforum/Messages.aspx?ThreadID=21408

wtijsma
User
Posts: 252
Joined: 18-Apr-2006
# Posted on: 04-Dec-2012 15:36:39   

Walaa wrote:

Could you try the latest release of v.3.1? or the latest of v.3.5? ref: http://www.llblgen.com/tinyforum/Messages.aspx?ThreadID=21408

Well as mentioned in the question, this was already the latest release of 3.1.

3.5 works fine.

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39588
Joined: 17-Aug-2003
# Posted on: 04-Dec-2012 17:27:47   

I do recall this being fixed in DB2's version as well for v3.1. Let me check in the logs and I'll get back to you.

Btw, it's a bug in the DQE (query engine) not the driver wink

Frans Bouma | Lead developer LLBLGen Pro
Otis avatar
Otis
LLBLGen Pro Team
Posts: 39588
Joined: 17-Aug-2003
# Posted on: 04-Dec-2012 17:45:50   

Fixed. See the attached dqe. If this doesn't fix your problem, please let me know.

Attachments
Filename File size Added on Approval
SD.LLBLGen.Pro.DQE.DB2.NET20.dll 36,864 04-Dec-2012 17:45.57 Approved
Frans Bouma | Lead developer LLBLGen Pro
wtijsma
User
Posts: 252
Joined: 18-Apr-2006
# Posted on: 04-Dec-2012 17:53:43   

Otis wrote:

I do recall this being fixed in DB2's version as well for v3.1. Let me check in the logs and I'll get back to you.

Btw, it's a bug in the DQE (query engine) not the driver wink

Thanks!

I did use the occasion to migrate our project to 3.5 now, for me it's not a high prio.

I also found out we had some mixups in the project with assemblies, where some being referenced from the local solution folder, and the \program files\solutions design\ folder, so it could be related to mixing different builds, but I thought I cleaned all folders before updating.

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39588
Joined: 17-Aug-2003
# Posted on: 05-Dec-2012 09:27:54   

The fixed dll is attached to my previous post, for whenever you might need it wink

Frans Bouma | Lead developer LLBLGen Pro