|
 |
aspx thread: VS: VS: Re: VS: Text Datatype Problem
Message #1 by "Teemu Keiski" <wroxhelp@m...> on Wed, 28 Aug 2002 20:41:14 +0300
|
|
I'm not completely sure but I usually define them always (even text
type) and if there is problems for some reason, I leave the definition
out. As long as you know the length what it can be in maximum and take
care that the length does not go over it, everything should be fine.
I think that at least for "byte-sized" (what the real term might be, I
don't speak English as native language as could be expected) data-types
like int,bigint,smallint,tinyint etc you don't have to define it for
sure.
Teemu
-----Alkuper=E4inen viesti-----
L=E4hett=E4j=E4: Mitchell Adams [mailto:MADAMS@p...]
L=E4hetetty: 28. elokuuta 2002 20:06
Vastaanottaja: ASP+
Aihe: [aspx] VS: Re: VS: Text Datatype Problem
Imar and Teemu,
Not specifying a length in the parameter did the trick. Thanks!
Is it not necessary to declare the length in parameters of other
datatypes (varchar, bit, etc...)?
Mitch
>>> wroxhelp@m... 08/28/02 12:12PM >>>
And how does it behave if you don't specify length at all?
Teemu
-----Alkuper=E4inen viesti-----
L=E4hett=E4j=E4: Mitchell Adams [mailto:MADAMS@p...]
L=E4hetetty: 28. elokuuta 2002 19:01
Vastaanottaja: ASP+
Aihe: [aspx] Re: VS: Text Datatype Problem
I did try changing the number of characters in the parameter.
MyCommand.Parameters.Add(New SqlParameter("@Release_Body",
SqlDbType.Text, 10000))
It would still trim off after about 5,000 characters were inserted.
Any other ideas?
Thanks
Mitch
>>> wroxhelp@m... 08/28/02 12:00PM >>>
If you define the length in SQLParameter like that it really means 16
characters (it's parameters definition not text data type's)
About text:"
Variable-length non-Unicode data in the code page of the server and with
a maximum length of 231-1 (2,147,483,647) characters. When the server
code page uses double-byte characters, the storage is still
2,147,483,647 bytes. Depending on the character string, the storage size
may be less than 2,147,483,647 bytes. "
So define the parameter something like (assuming you dont use Unicode or
something):
-------------------------
Teemu Keiski
Designer/Developer
Mansoft tietotekniikka Oy
Finland
MyCommand.Parameters.Add(New SqlParameter("@Release_Body",
SqlDbType.Text, 2147483647))
-----Alkuper=E4inen viesti-----
L=E4hett=E4j=E4: Mitchell Adams [mailto:MADAMS@p...]
L=E4hetetty: 28. elokuuta 2002 18:50
Vastaanottaja: ASP+
Aihe: [aspx] Text Datatype Problem
I've got a column in SQL Server 2000 set as a text datatype with a size
of 16.
I'm trying to insert some data into this column but all that's getting
put in is the first 16 characters
code:
'Create and Add Parameter
MyCommand.Parameters.Add(New SqlParameter("@Release_Body",
SqlDbType.Text, 16))
'Set the value to that of a textbox's text
MyCommand.Parameters("@Release_Body").Value =3D HTMLEdit.Text
I realize that the column should only be holding a pointer to the rest
of the text but I don't know how to get to the rest of the text if it is
indeed working....
Text in row is turned off.
Any help is appreciated.
Thanks
Mitch
---
ASP.NET 1.0 Namespace Reference with C#
http://www.wrox.com/acon11.asp?ISBN=3D1861007442
ASP.NET 1.0 Namespace Reference with VB.NET
http://www.wrox.com/acon11.asp?ISBN=3D1861007450
These books are a complete reference to the ASP.NET namespaces
for developers who are already familiar with using ASP.NET.
There is no trivial introductory material or useless .NET
hype and the presentation of the namespaces, in an easy-to use
alphabetical order ensures a user-friendly reference format.
We provide in-depth coverage of all the major ASP.NET classes,
giving you those real-world tips that the documentation doesn't
offer, and demonstrating complex techniques with simple
examples.
---
---
ASP.NET 1.0 Namespace Reference with C#
http://www.wrox.com/acon11.asp?ISBN=3D1861007442
ASP.NET 1.0 Namespace Reference with VB.NET
http://www.wrox.com/acon11.asp?ISBN=3D1861007450
These books are a complete reference to the ASP.NET namespaces for
developers who are already familiar with using ASP.NET. There is no
trivial introductory material or useless .NET hype and the presentation
of the namespaces, in an easy-to use alphabetical order ensures a
user-friendly reference format. We provide in-depth coverage of all the
major ASP.NET classes, giving you those real-world tips that the
documentation doesn't offer, and demonstrating complex techniques with
simple examples.
---
---
Change your mail options at http://p2p.wrox.com/manager.asp or to
unsubscribe send a blank email to
---
ASP.NET 1.0 Namespace Reference with C#
http://www.wrox.com/acon11.asp?ISBN=3D1861007442
ASP.NET 1.0 Namespace Reference with VB.NET
http://www.wrox.com/acon11.asp?ISBN=3D1861007450
These books are a complete reference to the ASP.NET namespaces
for developers who are already familiar with using ASP.NET.
There is no trivial introductory material or useless .NET
hype and the presentation of the namespaces, in an easy-to use
alphabetical order ensures a user-friendly reference format.
We provide in-depth coverage of all the major ASP.NET classes,
giving you those real-world tips that the documentation doesn't
offer, and demonstrating complex techniques with simple
examples.
---
---
ASP.NET 1.0 Namespace Reference with C#
http://www.wrox.com/acon11.asp?ISBN=3D1861007442
ASP.NET 1.0 Namespace Reference with VB.NET
http://www.wrox.com/acon11.asp?ISBN=3D1861007450
These books are a complete reference to the ASP.NET namespaces for
developers who are already familiar with using ASP.NET. There is no
trivial introductory material or useless .NET hype and the presentation
of the namespaces, in an easy-to use alphabetical order ensures a
user-friendly reference format. We provide in-depth coverage of all the
major ASP.NET classes, giving you those real-world tips that the
documentation doesn't offer, and demonstrating complex techniques with
simple examples.
---
---
Change your mail options at http://p2p.wrox.com/manager.asp or to
unsubscribe send a blank email to
---
ASP.NET 1.0 Namespace Reference with C#
http://www.wrox.com/acon11.asp?ISBN=3D1861007442
ASP.NET 1.0 Namespace Reference with VB.NET
http://www.wrox.com/acon11.asp?ISBN=3D1861007450
These books are a complete reference to the ASP.NET namespaces
for developers who are already familiar with using ASP.NET.
There is no trivial introductory material or useless .NET
hype and the presentation of the namespaces, in an easy-to use
alphabetical order ensures a user-friendly reference format.
We provide in-depth coverage of all the major ASP.NET classes,
giving you those real-world tips that the documentation doesn't
offer, and demonstrating complex techniques with simple
examples.
---
|
|
 |