H
hoz
Hi ,
i have a complex ideas about sqlparameter lenght . lets say i have the
following code
mycom.Parameters.Add("@sip",SqlDbType.NVarChar);
mycom.Parameters["@sip"].Value = siparisid ;
in the stored procedure : create proc SP @kid int , @sip nvarchar(50) as
....
as you have seen , i dont specify parameter lenght in C# . Why ? because
when some changes occurs in db , i only make change in stored procedure.
Does it decrease performance ? and which one is better to use : 1- using
parameter lenght in c# , 2 - using parameter lenght in sp , 3- both of them
.. And why ?
thanks for your help
i have a complex ideas about sqlparameter lenght . lets say i have the
following code
mycom.Parameters.Add("@sip",SqlDbType.NVarChar);
mycom.Parameters["@sip"].Value = siparisid ;
in the stored procedure : create proc SP @kid int , @sip nvarchar(50) as
....
as you have seen , i dont specify parameter lenght in C# . Why ? because
when some changes occurs in db , i only make change in stored procedure.
Does it decrease performance ? and which one is better to use : 1- using
parameter lenght in c# , 2 - using parameter lenght in sp , 3- both of them
.. And why ?
thanks for your help