Click here to Skip to main content
15,899,475 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
C#
The following is the Output Paramter i'm passing from front end to backend 

DbParameter UID = cmdInsertUpdateAcTran.CreateParameter();
              UID.ParameterName = "@UID";
              UID.DbType = DbType.String;
              UID.Direction = ParameterDirection.Output;
              UID.Value = miscVO.PUID;
              cmdInsertUpdateAcTran.Parameters.Add(UID);

Here is the value(i.e output param) that has to be returned to the frontend from backend 
@UID='H0000018201516ANLPV9'

@UID is inserting to the backend properly but the issue here is it's returning only 1st character i.e 'H' to the front end. Rather i need full String


--Thanks

What I have tried:

select @UID=rtrim(Formtype)+rtrim(Slno)+rtrim(YrBeginYrEndID) from #temp


INSERT INTO [Customer15G]
([CustomerCode],[Customer15HDate],[ReceivedBy],[ReceivedDate],[FormType],[YearBeginDate],[YearEndDate], [UID])
VALUES
(@CustomerCode,@Customer15HDate,@ReceivedBy,@ReceivedDate,@FormType,@EnteredDate,@IntCalTillDate, @UID)


Drop table #temp
Posted
Updated 10-Feb-16 3:15am
v7
Comments
ZurdoDev 10-Feb-16 9:16am    
The front end is your c#. Show the code where you are trying to get it's value.
Richard Deeming 10-Feb-16 9:38am    
You haven't set the Size of the parameter. Try setting it to the size of the parameter as declared in your stored procedure.
JanardhanSharma 10-Feb-16 23:54pm    
by default it's returning only length of 1character

Declaring the size in frontend resolved the probe..
UID.Size = 100;

Thanq

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900