Action Stored Procedure

Posts   
 
    
Santhi
User
Posts: 5
Joined: 26-Oct-2007
# Posted on: 29-Jul-2008 20:37:11   

I have a stored procedure to update a column for a given value. I have the following sql in the stored procedure

update TicketingWillcallLocations set InternetWillCallAllowed = @willCallFlag where willcallId = @willCallId

@willCallFlag - .NET type string and DB type is char(1) @willCallId - .NET type is int and DB type is int (Note: It is an identity key in the table)

While I debug I see the value('Y' or 'N') sent from the program, but the value doesn't seem to be passed correctly to the stored procedure since it updates the willcallflag to empty string after the stored procedure is called.

Any help would be greatly appreciated.

Thanks, Santhi

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39866
Joined: 17-Aug-2003
# Posted on: 29-Jul-2008 21:24:12   

This has nothing to do with Linq so this is the wrong forum. I'll move it to General You should give more information: version of llblgen pro, runtime library build nr, your code you use to call the procedure etc. (see guidelines thread in all the forums)

Frans Bouma | Lead developer LLBLGen Pro
Santhi
User
Posts: 5
Joined: 26-Oct-2007
# Posted on: 29-Jul-2008 21:48:17   

LLBLGEN PRo - 2.5 Runtime Library - DotNet20 C# code int i = ActionProcedures.UpdateTicketingWillCallLocations(willCallId, willCallFlag); eg values passed to stored procedure willCallId = 123 willCallFlag = "Y" or "N"

Stored procedure

CREATE PROCEDURE dbo.sp_UpdateTicketingWillCallLocations

@willCallId int, @willCallFlag char(1)

AS

SET NOCOUNT ON

update TicketingWillcallLocations set InternetWillCallAllowed = @willCallFlag where willcallId = @willCallId

GO

Walaa avatar
Walaa
Support Team
Posts: 14994
Joined: 21-Aug-2005
# Posted on: 30-Jul-2008 10:42:22   

In the database: is there a check constraint on the field?

Would you please try the following code:

int i = ActionProcedures.UpdateTicketingWillCallLocations(123, 'Y');

Note I used 'Y' instead of "Y"

Santhi
User
Posts: 5
Joined: 26-Oct-2007
# Posted on: 30-Jul-2008 16:28:55   

Yes, it works by changing the LLBLGEN generated code to take the parameter of type char instead of string.

I was wondering whether we could have some settings in the LLBLGEN project to generate the code with the .net type matching the DB data type.

Walaa avatar
Walaa
Support Team
Posts: 14994
Joined: 21-Aug-2005
# Posted on: 30-Jul-2008 17:20:27   

Which runtime library version are you using?

Santhi
User
Posts: 5
Joined: 26-Oct-2007
# Posted on: 30-Jul-2008 18:14:59   

Runtime version is 2.5.7.1019

Walaa avatar
Walaa
Support Team
Posts: 14994
Joined: 21-Aug-2005
# Posted on: 31-Jul-2008 09:42:49   

Would you please download and use the latest release of LLBLGen Pro (the Full Package)? And then refresh the catalog and re-generate the code and try again.