Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > Database > SQL Language
Password Reminder
Register
Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
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 tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old June 6th, 2008, 04:44 AM
Authorized User
 
Join Date: Jan 2008
Location: , , .
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



Reply With Quote
  #2 (permalink)  
Old June 6th, 2008, 12:43 PM
Imar's Avatar
Wrox Author
Points: 72,022, Level: 100
Points: 72,022, Level: 100 Points: 72,022, Level: 100 Points: 72,022, Level: 100
Activity: 100%
Activity: 100% Activity: 100% Activity: 100%
 
Join Date: Jun 2003
Location: Utrecht, Netherlands.
Posts: 17,076
Thanks: 80
Thanked 1,587 Times in 1,563 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.
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


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



All times are GMT -4. The time now is 10:11 PM.


Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.