What is SQLdatasource parameter 'size'?

J

John Mason

Hi,

I'm new to ASP.NET 2.0 and I am trying to get more information on the
size property within the parameter tag of the SQLdatasource control.

I have this code as an example...
<asp:parameter Type="String" Name="NewID" Direction="Output" Size="4">

Does Size="4" represent 4 characters in length? In the case of an
IDENTITY integer being returned after an INSERT, does having size = "4"
mean that the integer can be up to 9999?

What does the number represent?!

Thanks in advance,

John.
 
H

Hans Kesting

Hi,
I'm new to ASP.NET 2.0 and I am trying to get more information on the
size property within the parameter tag of the SQLdatasource control.

I have this code as an example...
<asp:parameter Type="String" Name="NewID" Direction="Output" Size="4">

Does Size="4" represent 4 characters in length? In the case of an
IDENTITY integer being returned after an INSERT, does having size = "4"
mean that the integer can be up to 9999?

What does the number represent?!

Thanks in advance,

John.

For a string it's the size in characters. Your example corresponds to a
"char(4)" (or "varchar(4)", "nchar(4)" or "nvarchar(4)") in SqlServer.
I don't think the size is be needed for integers, but then it would be
the size in bytes, not the number of digits in the decimal
representation of the value.


Hans Kesting
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,065
Latest member
OrderGreenAcreCBD

Latest Threads

Top