Code Generation / Execution Problem

Posts   
 
    
Posts: 72
Joined: 11-Aug-2006
# Posted on: 06-Jul-2012 06:54:39   

Hi

LLBGen 3.5 Latest Build , downloaded today.. Generating adapter , defaults everything else. SQL Server.

Trying to use Linq & had problem since upgrading to 3.5 - it doesnt seem to be generating the code correctly or something. I have never had any problems like this before. tried generating everything frmo scratch too..

Inner Exception: {"The multi-part identifier \".LPFA_1\" could not be bound."}

Query: SELECT [LPLA_1].[BatchID] AS [BatchId], [LPLA_1].[Date], [LPLA_1].[Amount], [LPLA_1].[Cur] FROM [Artoo].[dbo].[BankTransactions] [LPLA_1]
WHERE ( ( ( ( ( .[LPFA_1] = @p2))))) Parameter: @p2 : Boolean. Length: 0. Precision: 0. Scale: 0. Direction: Input. Value: True.

linq used -

        var batches = from b in linq.BankTransaction
                      where b.AccountId == AccountID
                      & b.Date >= dateFrom.Value
                      & b.Date <= DateTo.Value
                      & b.BatchId == null
                      select new { b.BatchId, b.Date, b.Amount, b.Cur };
Otis avatar
Otis
LLBLGen Pro Team
Posts: 39910
Joined: 17-Aug-2003
# Posted on: 06-Jul-2012 09:58:00   

Are you sure that code produced that query? because it passes in 'true' as a boolean, but in your query you don't have a boolean value.

Please trim down the linq query till you have the minimum query which reproduces this and provide any other information we need to reproduce it (as with the query you gave we can't)

You're also sure all your code is upgrade to v3.5 and you're referencing the proper v3.5 runtime libraries, also in your executable project?

Frans Bouma | Lead developer LLBLGen Pro
Posts: 72
Joined: 11-Aug-2006
# Posted on: 09-Jul-2012 06:28:08   

yep - all good. Had wrong Libraries referenced.