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

Forum statistics

Threads
473,744
Messages
2,569,482
Members
44,901
Latest member
Noble71S45

Latest Threads

Top