Wrox Programmer Forums
|
SQL Language SQL Language discussions not specific to a particular RDBMS program or vendor.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the SQL Language section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old June 6th, 2008, 04:44 AM
Authorized User
 
Join Date: Jan 2008
Posts: 46
Thanks: 0
Thanked 0 Times in 0 Posts
Default long text field

 Hi

I have a textbox field that take 2000 characters from user..Then I used a store procedure to save that user input into database through an insert statement, but for some reason it just never store the whole string of 2000 characters but only store some of it (like 100 or something) .. Seems like a data type problem…(I am using SQL server 2000)



This is what I have defined:



---------------------------------------

In storeprocedure:



@iidea2 varchar(2000)





Table Design



Idea2 varchar 2000





Aspx page



cmd.Parameters.Add(New SqlParameter("@iidea2", SqlDbType.VarChar)).Value = Idea2



 
Old June 6th, 2008, 12:43 PM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

Hi there,

Have you tried creating a SqlParameter explicitly and setting its Size property?

http://msdn.microsoft.com/en-us/libr...parameter.aspx

Imar


---------------------------------------
Imar Spaanjaars
http://Imar.Spaanjaars.Com
Everyone is unique, except for me.
Author of Beginning ASP.NET 3.5 : in C# and VB, ASP.NET 2.0 Instant Results and Dreamweaver MX 2004
Want to be my colleague? Then check out this post.





Similar Threads
Thread Thread Starter Forum Replies Last Post
Reading field of 'Long' datatype from binary file peri C# 0 January 2nd, 2005 08:50 AM
Long text irfan4 ASP.NET 1.0 and 1.1 Basics 1 July 27th, 2004 09:30 AM
Modifying long text in a long field sajsal Classic ASP Databases 1 February 20th, 2004 12:36 PM
How to use long text in data base? tiolele Classic ASP Databases 3 November 26th, 2003 09:15 PM
Access long text fields Tharkun SQL Server ASP 2 October 30th, 2003 08:47 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.