Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 sql data size and type issue

Author  Topic 

rayman73
Starting Member

5 Posts

Posted - 2009-01-18 : 09:31:52

I am moving a website from one provider to another and the data is originally stored as sql. I have an access database of the data and one of the fields is a memo field and I have atleast one record that has over 30000 characters (html data) in it. Since there aren't many records, I was cutting and pasting the data over but when I try to do this one field, it truncates the data to show only the first line. The site I am moving things to is godaddy.com and it uses sql2005. My question is, what data type should i be using? I am very new to sql and any help would be greatly appreciated. Thanks in advance!

sodeep
Master Smack Fu Yak Hacker

7174 Posts

Posted - 2009-01-18 : 10:16:30
Text,ntext or varchar(max).
Go to Top of Page

sunitabeck
Master Smack Fu Yak Hacker

5155 Posts

Posted - 2009-01-18 : 11:21:42
To narrow down further on sodeep's recommendations, if you have a choice, use varchar(max) or nvarchar(max) rather than text or ntext. Microsoft is planning to deprecate text and ntext in some future version of SQL (http://msdn.microsoft.com/en-us/library/ms187993.aspx). If your website will be supporting international character sets, use nvarchar(max), else varchar(max) would suffice.
Go to Top of Page

sodeep
Master Smack Fu Yak Hacker

7174 Posts

Posted - 2009-01-18 : 11:30:52
quote:
Originally posted by sunitabeck

To narrow down further on sodeep's recommendations, if you have a choice, use varchar(max) or nvarchar(max) rather than text or ntext. Microsoft is planning to deprecate text and ntext in some future version of SQL (http://msdn.microsoft.com/en-us/library/ms187993.aspx). If your website will be supporting international character sets, use nvarchar(max), else varchar(max) would suffice.



Agreed.
Go to Top of Page

rayman73
Starting Member

5 Posts

Posted - 2009-01-18 : 12:04:42
quote:
Originally posted by sunitabeck

To narrow down further on sodeep's recommendations, if you have a choice, use varchar(max) or nvarchar(max) rather than text or ntext. Microsoft is planning to deprecate text and ntext in some future version of SQL (http://msdn.microsoft.com/en-us/library/ms187993.aspx). If your website will be supporting international character sets, use nvarchar(max), else varchar(max) would suffice.



It doesn't allow me to paste the full information into the field. I only allows my to paste the first line.
Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2009-01-18 : 12:12:53
even after casting to varchar(max)?
Go to Top of Page

rayman73
Starting Member

5 Posts

Posted - 2009-01-18 : 18:49:30
Yes. I can type as many characters as I want, but I cannot copy and paste as many as I want. Very frustrating!
Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2009-01-18 : 22:46:06
quote:
Originally posted by rayman73

Yes. I can type as many characters as I want, but I cannot copy and paste as many as I want. Very frustrating!


copy and paste to where?
Go to Top of Page

rayman73
Starting Member

5 Posts

Posted - 2009-01-19 : 09:06:10
quote:
Originally posted by visakh16

quote:
Originally posted by rayman73

Yes. I can type as many characters as I want, but I cannot copy and paste as many as I want. Very frustrating!


copy and paste to where?



I can manually add records inside a form on godaddy's website.
Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2009-01-19 : 09:09:23
you mean you cant enter required characters through form?then it might be because you've set limitation of maxlength on form input control
Go to Top of Page

rayman73
Starting Member

5 Posts

Posted - 2009-01-19 : 10:37:52
quote:
Originally posted by visakh16

you mean you cant enter required characters through form?then it might be because you've set limitation of maxlength on form input control



Here are the options I have.


Column lbody
Type VarCharMax
Length (greyed out)
Prec. 0
Scale 0
Nullable unchecked
Default blank
ID False
ID Incr. 0
ID Seed 0
Row Guid False

Go to Top of Page
   

- Advertisement -