Help with exceptions

Posts   
 
    
mark_666x
User
Posts: 5
Joined: 30-Jul-2007
# Posted on: 02-Aug-2007 19:13:37   

Hi. I'm moving my LLBLGen pro generated code from version 1 to 2. By the moment, the only things that i've made were to refresh schemas from the data base and regenerate the code. I have fixed a couple of issues concerning little changes in the db, but in this moment i got an exception in a piece of code that i did not touch. I cannot find any information about this message. Ihave traced the error 'till a pice of code were a a store procedure is invoked. Othe SP's are invoked normally, so i don't know what is going on. By the way, i'm using adapter paradigm.

Could any body help please?? the execption says (Sorry for the length):

There was an error processing the request. Object must implement IConvertible. at System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream) at System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior behavior) at System.Data.SqlClient.SqlCommand.System.Data.IDbCommand.ExecuteReader(CommandBehavior behavior) at System.Data.Common.DbDataAdapter.FillFromCommand(Object data, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior) at System.Data.Common.DbDataAdapter.Fill(DataTable dataTable, IDbCommand command, CommandBehavior behavior) at System.Data.Common.DbDataAdapter.Fill(DataTable dataTable) at Odyssey.DataLayer.DatabaseSpecific.DataAccessAdapter.CallRetrievalStoredProcedure(String storedProcedureToCall, SqlParameter[] parameters, DataTable tableToFill) at Odyssey.DataLayer.DatabaseSpecific.RetrievalProcedures.SitePromotionsSearch(Object siteItemId, Object databaseName, Object languageId, Object currencyId, Object supplierId, Object externalId, Object destinationId, Object brandId, Object departureCity, Object departureStartDate, Object departureEndDate, Object countryId, Object stateId, Object promotionTypeId, Object classTypeId, Object seniorCount, Object adultCount, Object childCount, Object bookingDate, Object packageId, Object fareCodeSiteItemId, Object productTypeId, Object fromCity, Object toCity, Object fromCountry, Object toCountry, Object fareType, DataAccessAdapter adapter) at Odyssey.DataLayer.DatabaseSpecific.RetrievalProcedures.SitePromotionsSearch(Object siteItemId, Object databaseName, Object languageId, Object currencyId, Object supplierId, Object externalId, Object destinationId, Object brandId, Object departureCity, Object departureStartDate, Object departureEndDate, Object countryId, Object stateId, Object promotionTypeId, Object classTypeId, Object seniorCount, Object adultCount, Object childCount, Object bookingDate, Object packageId, Object fareCodeSiteItemId, Object productTypeId, Object fromCity, Object toCity, Object fromCountry, Object toCountry, Object fareType) at Odyssey.Promotions.Business.PromotionBusiness.SearchPromotions(PromotionSearch promoSch, Int32 siteItemId, Int32 languageId, String catalog, String currencyId, Boolean isAdmin, DataAccessAdapter adapter, Int32 PackageID, Int32 FareCodeSiteItemID) in C:\OdysseyNG\OdysseyWS\Odyssey\Promotions\Business\PromotionBusiness.cs:line 346 at Odyssey.SupplierConnections.Response.GetAirMarkups(AirResponse responseObj, String& fromCity, String& fromCountry, String& toCity, String& toCountry) in c:\odysseyng\odysseyws\odyssey\supplierconnections\response.cs:line 7817 at Odyssey.SupplierConnections.Response.LowFareSearchPlusResponse(OTA_AirLowFareSearchPlusRS AirResponseObj, AirResponse responseObj) in c:\odysseyng\odysseyws\odyssey\supplierconnections\response.cs:line 4428 at Odyssey.SupplierConnections.Request.LowFareSearchPlusRequest(AirResponse responseObj) in c:\odysseyng\odysseyws\odyssey\supplierconnections\request.cs:line 5628 at Odyssey.SupplierConnections.Request.AirRequestWS(AirRequest requestObj) in c:\odysseyng\odysseyws\odyssey\supplierconnections\request.cs:line 4835 at Odyssey.ClientWS.Client.SearchForPackages(AirRequest requestObj, String sessionID) in c:\odysseyng\odysseyws\clientws\default.asmx.cs:line 4474

Walaa avatar
Walaa
Support Team
Posts: 14995
Joined: 21-Aug-2005
# Posted on: 03-Aug-2007 08:45:47   

This sound like a type mismatch between the SP aparameter type and the value passed in to the SP. This could have happened because of a change on the database, or because of new Nullable type feature of v.2.0

Quoted from the docs ("What's New"):

Stored procedure parameters which are a value type are nullable now as well in .NET 2.0 code. Breaking change: this leads to a breaking change where values from a nullable field a read into a non-nullable type, like int / Integer. See template changes below for more info on this. LLBLGen Pro offers a preference setting in the designer (GenerateNullableFieldsAsNullableTypes) and per-field checkboxes to overrule this default behavior.

Please check the data type of the SP call and the types of the parameters passed to ti.