Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 ErrorCode 8144

Author  Topic 

Anushka
Yak Posting Veteran

79 Posts

Posted - 2008-06-14 : 01:27:22

Hi,
In my local , application is working fyn...but when i had uploaded in the file in Live and executed the SP's ,It is showing up the error 8144...
Whene i had checked in google it is showing:
has too many arguments specified: Msg 8144....But i had not passed to many arguments...
(The same SP is working in local but not in live)...
The related files also i had shifted to live...

This is the SP I Have used....
while Submiting iam getting error
GO

SET QUOTED_IDENTIFIER ON
GO
SET ANSI_NULLS ON
GO



--- STORED PROCEDURE USP_CREATE_USER TO SAVE THE APPLICATION INFORMATION INTO DATABASE


CREATE PROCEDURE dbo.USP_CREATE_APPLICATION_ONLINE
(

@ApplicationID INT,
@Broker CHAR(1),
@Name VARCHAR(30),
@Phone VARCHAR(15),
@Email VARCHAR(50),
@LoanAmount Decimal(9),
@LoanPurpose VARCHAR(200),
@DeedType_ID VARCHAR(50),
@SubDeedType_ID INT,
@DeedAddress VARCHAR(200),
@City VARCHAR(50),
@CountryID INT,
--@StateID INT,
@MarketValue Decimal(9),
@LoanTerm INT,
@Appraised CHAR(3),
@Comments VARCHAR(50),
@DeleteFlag VARCHAR(1),
@RETURN int OUT,
@ERRORCODE int OUT
)

AS
set @RETURN=1
SET NOCOUNT ON


iF EXISTS(SELECT * FROM APPLICATION_ONLINE WHERE ApplicationID=@ApplicationID)
Begin
BEGIN TRANSACTION TRANSUPDATE
UPDATE APPLICATION_ONLINE SET

ApplicationID = @ApplicationID,
Broker = @Broker,
[Name] = @Name,
Phone = @Phone,
Email = @Email,
LoanAmount=@LoanAmount,
LoanPurpose=@LoanPurpose,
DeedType_ID=@DeedType_ID,
SubDeedType_ID=@SubDeedType_ID,
DeedAddress =@DeedAddress,
City =@City,
CountryID = @CountryID,
MarketValue = @MarketValue,
LoanTerm = @LoanTerm,
Appraised =@Appraised,
Comments =@Comments

WHERE [ApplicationID] = @ApplicationID

SET @ERRORCODE=@@ERROR
IF @ERRORCODE <> 0
BEGIN
ROLLBACK TRANSACTION TRANSUPDATE
SET @ERRORCODE=@@ERROR
RETURN
END
ELSE
BEGIN
COMMIT TRANSACTION TRANSUPDATE
SET @ERRORCODE=50002
RETURN
END

END

else

BEGIN
BEGIN TRANSACTION TRANSINSERT
INSERT INTO APPLICATION_ONLINE(
ApplicationID,
Broker,
[Name],
Phone,
Email,
LoanAmount,
LoanPurpose,
DeedType_ID,
SubDeedType_ID,
DeedAddress,
City,
CountryID,
-- StateID,
MarketValue,
LoanTerm,
Appraised ,
Comments,
DeleteFlag
)
VALUES
(
@ApplicationID,
@Broker,
@Name,
@Phone,
@Email,
@LoanAmount,
@LoanPurpose,
@DeedType_ID,
@SubDeedType_ID,
@DeedAddress,
@City,
@CountryID,
-- @StateID,
@MarketValue,
@LoanTerm,
@Appraised,
@Comments,
@DeleteFlag

)

SET @ERRORCODE=@@ERROR
IF @ERRORCODE <> 0
BEGIN
ROLLBACK TRANSACTION TRANSINSERT
SET @ERRORCODE=50004
RETURN
END
ELSE
BEGIN
COMMIT TRANSACTION TRANSINSERT
SET @ERRORCODE=50001
RETURN

END

END



GO
SET QUOTED_IDENTIFIER OFF
GO
SET ANSI_NULLS ON
GO

Thanks

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2008-06-14 : 02:11:59
How are invoking this sp from application? What are the values passed for parameters?
Go to Top of Page

Anushka
Yak Posting Veteran

79 Posts

Posted - 2008-06-14 : 04:08:54
HI,
From front end:iam calling this
SaveApplication function:

public int SaveApplication(string ApplicationID,string Broker,string Name,string Phone,string Email,string LoanAmount,string LoanPurpose,string PropertType,string SubPropertyType1,
string PropertyAddress,string City,string Country,string State,string MarketValue,string LoanTerm,string Appraised,string Comments,string DELETEFLAG)
{
int returnValue=0;
StoredProcedure SP = new StoredProcedure();

// create params for stored procedure call

SqlParameter [] param =
{
SP.MakeInParam("@ApplicationID",SqlDbType.Int,4,Convert.ToInt32(ApplicationID)),
SP.MakeInParam("@Broker",SqlDbType.Char,1,Broker),
SP.MakeInParam("@Name",SqlDbType.VarChar,30,Name),
SP.MakeInParam("@Phone",SqlDbType.VarChar,15,Phone),
SP.MakeInParam("@Email",SqlDbType.VarChar,50,Email),
SP.MakeInParam("@LoanAmount",SqlDbType.Decimal,9,LoanAmount),
SP.MakeInParam("@LoanPurpose",SqlDbType.VarChar,200,LoanPurpose),
SP.MakeInParam("@DeedType_ID",SqlDbType.VarChar,50,Convert.ToString(PropertType)),
SP.MakeInParam("@SubDeedType_ID",SqlDbType.Int,4,Convert.ToInt32(SubPropertyType1)),
SP.MakeInParam("@DeedAddress",SqlDbType.VarChar,200,PropertyAddress),
SP.MakeInParam("@City",SqlDbType.VarChar,50,City),
SP.MakeInParam("@CountryID",SqlDbType.Int,4,Convert.ToInt32(Country)),
// SP.MakeInParam("@StateID",SqlDbType.Int,4,Convert.ToInt32(State)),
SP.MakeInParam("@MarketValue",SqlDbType.Decimal,9,MarketValue),
SP.MakeInParam("@LoanTerm",SqlDbType.Int,4,Convert.ToInt32(LoanTerm)),
SP.MakeInParam("@Appraised",SqlDbType.Char,3,Appraised),
SP.MakeInParam("@Comments",SqlDbType.VarChar,50,Comments),
SP.MakeInParam("@DELETEFLAG",SqlDbType.VarChar,1,DELETEFLAG),
SP.MakeOutParam("@RETURN",SqlDbType.Int,4),
SP.MakeOutParam("@ERRORCODE",SqlDbType.Int,4),
};

try
{
SP.RunProc("USP_CREATE_APPLICATION_ONLINE", param,out returnValue, out errorCode);
}
catch(Exception ee)
{
return errorCode;
}

if (errorCode==50001||errorCode==50002)
{
return errorCode;
}
else
{
return errorCode;
}
}
Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2008-06-15 : 03:23:01
Similar discussion:-
http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=545581&SiteID=1
Go to Top of Page
   

- Advertisement -