2.0 Issue: "Failed to convert parameter String to Int32 ..."

Posts   
 
    
Zarko
User
Posts: 1
Joined: 05-Sep-2006
# Posted on: 04-Oct-2006 16:13:56   

Hi,

I have the following problem with saving an Entity to a SQL Server 2005 database.

The exception reported is:

"An exception was caught during the execution of an action query: Failed to convert parameter value from a String to a Int32....."

A table in the database has a bunch of "nvarchar" and a few "int" fields - all are "allow NULLS" except one that is the primary auto-generated GUID value.

When using the same code generated with LLBLGEN V 1.0 the exception is NOT reported.

"Setup": ORM ver. num. v2.0.50727, C#, Adapter, SQL Server 2005, VS 2005, Windows Forms

Any known issues with this?

Here's the StackTrace:

at SD.LLBLGen.Pro.ORMSupportClasses.ActionQuery.Execute()\r\n at SD.LLBLGen.Pro.ORMSupportClasses.BatchActionQuery.Execute()\r\n at SD.LLBLGen.Pro.ORMSupportClasses.DataAccessAdapterBase.ExecuteActionQuery(IActionQuery queryToExecute)\r\n at SD.LLBLGen.Pro.ORMSupportClasses.DataAccessAdapterBase.PersistQueue(List`1 queueToPersist, Boolean insertActions)\r\n at SD.LLBLGen.Pro.ORMSupportClasses.DataAccessAdapterBase.SaveEntity(IEntity2 entityToSave, Boolean refetchAfterSave, IPredicateExpression updateRestriction, Boolean recurse)\r\n at SD.LLBLGen.Pro.ORMSupportClasses.DataAccessAdapterBase.SaveEntity(IEntity2 entityToSave)\r\n at ImportHelper.MainForm.ProcessLine(String line) in D:\DotNet Projects\Hep Plin Mobile\HepPlinMobile\Source\ImportHelper\MainForm.cs:line 162"

p.s. I could post the entire "QueryExecuted" if needed ( a larger one as I have more that 30 fields in the table)

~Zarko

Walaa avatar
Walaa
Support Team
Posts: 14995
Joined: 21-Aug-2005
# Posted on: 04-Oct-2006 16:42:45   

ORM ver. num -> Please right click on the "SD.LLBLGen.Pro.ORMSupportClasses.NETxx.dll" file select Properties, then go to the version tab, and there you will find the "File Version" attribute.

Are you using any TypeConverters?

Use the Designer to refresh the catalog then re-generate the code and re-build. And make sure your application is using the newly generated code.