ASP.NET Templates and NVARCHAR(max) fields

Posts   
 
    
Posts: 8
Joined: 10-May-2007
# Posted on: 08-Jun-2007 17:27:34   

I am having intermittant problems with fields defined as NVARCHAR(max).

Specifically, when navigating to ListAll.aspx for an entity that has such a field, I'm getting the following error: _The size (2147483647) given to the column 'Notes' exceeds the maximum allowed for any data type (8000). _

It's not every time, though. I can see the first page of entities on ListAll, but when I try to go to the second page it fails.

I do not think this is directly related to the entity as I can edit and view entities by changing the ID up in the browser location bar and view/edit entity 11.

I do know that the error happens after the last block of code executed in the generated code:

        protected override DynamicQueryEngineBase CreateDynamicQueryEngine()
        {
            DynamicQueryEngine toReturn = new DynamicQueryEngine();
            toReturn.PerCallCatalogNameOverwrites = _catalogNameOverwrites;
            toReturn.PerCallSchemaNameOverwrites = _schemaNameOverwrites;
            return (DynamicQueryEngineBase)toReturn;
        }

Stepping through the code using F11 gives me the above error immediately after this method (from DataAccessAdapter.ca) is executed.

To reproduce this error, just add a field with type NVARCHAR(max) and put 11 records in it. Browse to the second page of the viewall page's grid.

Cheers, -jc

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39774
Joined: 17-Aug-2003
# Posted on: 08-Jun-2007 17:56:23   

This is a paging bug in the Sqlserver DQE on Sqlserver2005. Could you try the latest runtime libs (which have this fixed) ?

Frans Bouma | Lead developer LLBLGen Pro
Posts: 8
Joined: 10-May-2007
# Posted on: 09-Jun-2007 06:26:08   

Otis wrote:

This is a paging bug in the Sqlserver DQE on Sqlserver2005. Could you try the latest runtime libs (which have this fixed) ?

i can, sure...which libs? for sqlserver or llblgen pro? is there a version i can check?

cheers, -jc

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39774
Joined: 17-Aug-2003
# Posted on: 09-Jun-2007 11:16:17   

The fix is in the SqlServer DQE, however they're versioned on the ORMSupportClasses dll. The buildnr of the ormsupportclasses can be found as follows:

The runtime library version is obtainable by rightclicking the SD.LLBLGen.Pro.ORMSupportClasses.NETxy.dll in windows explorer and then by selecting properties and the version tab. The version is then enlisted at the top as the fileversion. It has the typical format as 2.0.0.YYMMDD, or starting in 2007, the format 2.0.YY.MMDD

This issue was fixed on January 29th, so any build after that date contains the fix. Please obtain the latest runtime libraries build from the customer area, v2.0 section.

Frans Bouma | Lead developer LLBLGen Pro
Posts: 8
Joined: 10-May-2007
# Posted on: 10-Jun-2007 06:36:19   

Otis wrote:

The fix is in the SqlServer DQE

my apologies; upon further review your previous note made that quite clear.

the continuation of this thread is just further proof that one shouldn't request help on a technical forum while under the influence of alcohol. ;o)

cheers, jc

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39774
Joined: 17-Aug-2003
# Posted on: 10-Jun-2007 10:19:06   

LOL smile

Frans Bouma | Lead developer LLBLGen Pro
sgm0369
User
Posts: 6
Joined: 18-Jan-2007
# Posted on: 07-Oct-2007 02:47:03   

Hi Frans,

sorry to dig up this old thread, but I have the very same issue with LLBLGenPro v2.5, using the 5/oct/2007 release as well. Could it be a regressive bug?

Thanks, Stefano.

daelmo avatar
daelmo
Support Team
Posts: 8245
Joined: 28-Nov-2005
# Posted on: 08-Oct-2007 01:30:26   

Hi Stefano,

You should SqlServerDQECompatibilityLevel to SQLServer2005. wink

<add key="SqlServerDQECompatibilityLevel" value="2" />

Refs: - http://www.llblgen.com/tinyforum/Messages.aspx?ThreadID=9297 - LLBLGenPro Help - Using generated code - Application configuration through .config files - DQE Compatibility mode(SqlServer only)

David Elizondo | LLBLGen Support Team
sgm0369
User
Posts: 6
Joined: 18-Jan-2007
# Posted on: 08-Oct-2007 17:29:55   

daelmo wrote:

Hi Stefano,

You should SqlServerDQECompatibilityLevel to SQLServer2005. wink

<add key="SqlServerDQECompatibilityLevel" value="2" />

Refs: - http://www.llblgen.com/tinyforum/Messages.aspx?ThreadID=9297 - LLBLGenPro Help - Using generated code - Application configuration through .config files - DQE Compatibility mode(SqlServer only)

Huh... flushed Yep, that did it. Many thanks!