And that fails in SQL server....
Using LLBLGen Pro 2.6 and SQL Server 2008R2
Somehow LLBLGEN generates an insert query with negative money variables like this, with an extra minus/hyphen:
@PriceEx=$-2.-5350
When I manually remove the second hyphen to $-2.5350, the query works..
I am not familiar with LLBLGEN, I inherited the project of a former colleague but running into this issue right now... So here are the questions:
1 is there a setting to force LLBLGen to write decimals in stead of money without the $ sign and weird extra hyphen/minus sign?
2 Is there a setting in SQL Server to accept $-2.-5350 as a valid money value?
3 Is there a way to 'catch and alter' the statement right before it is send to SQL Server so I can manually delete the second '-' / hyphen / minus sign?
4 Is there a way to 'replace / alter' the money conversion routine of LLBLGen?
Hope somebody knows where this comes from...
Thanx in advance for your help!
Regards, Marc
The complete insert statement:
declare @p3 int
set @p3=51
exec sp_executesql N'INSERT INTO [evHorstb2c].[dbo].[OrderItem] ([OrderId], [ProductId], [SubcodeId], [ProductName],
[SubcodeNumber], [SubcodeName], [ProductSubcodeName], [QuantityStandard], [QuantityExtra], [PriceEx],
[BtwId], [BtwCode], [ManualOrder], [Created], [CreatedBy])
VALUES (@OrderId, @ProductId, @SubcodeId, @ProductName, @SubcodeNumber, @SubcodeName, @ProductSubcodeName, @QuantityStandard,
@QuantityExtra, @PriceEx, @BtwId, @BtwCode, @ManualOrder, @Created, @CreatedBy);SELECT @OrderItemId=SCOPE_IDENTITY()',
N'@OrderItemId int output,@OrderId int,@ProductId int,@SubcodeId int,@ProductName varchar(100),
@SubcodeNumber varchar(20),@SubcodeName varchar(100),@ProductSubcodeName varchar(200),@QuantityStandard float,
@QuantityExtra float,@PriceEx money,@BtwId int,@BtwCode int,@ManualOrder bit,@Created datetime,@CreatedBy int',
@OrderItemId=@p3 output,@OrderId=31,@ProductId=279,@SubcodeId=1,@ProductName='Korting: 25.00% over 10.75 incl. BTW',
@SubcodeNumber='000',@SubcodeName='',@ProductSubcodeName='Korting-Btw-6',@QuantityStandard=0,@QuantityExtra=1,
@PriceEx=$-2.-5350,@BtwId=NULL,@BtwCode=1,@ManualOrder=1,@Created='2016-12-04 01:21:46.880',@CreatedBy=15
select @p3