August 17, 2011 at 8:15 am
HI ,
I want store some script files in my table . Which data type i have to use to store script files .
Regards,
Lavanya sri
August 17, 2011 at 8:37 am
Lavanyasri (8/17/2011)
HI ,I want store some script files in my table . Which data type i have to use to store script files .
Regards,
Lavanya sri
If your scripts are small you could do with NVARCHAR(4000)
For larger one use NVARCHAR(MAX)
August 17, 2011 at 8:57 am
HI Eugene,
Thanks for quick reply .
if we want to stor the data in a table nvarchar(max) is correct . But if we want to store the complete file which data type we should go for ???
August 17, 2011 at 9:24 am
Script file is the text isn't it?
So nvarchar(max) is the best for this. There is an option to store nibanry data in ntext, text ot image datatype, but it's not advisable for storing files.
BTW, files better to be stored in the file system (it just happen to be designed precisely for this).
Database is designed to store data.
But, if you insist...
There is FILESTREAM which integrates SQLServer with NTFS file system.
http://technet.microsoft.com/en-us/library/bb933993.aspx
Yeah, you will need to migrate to SQL2008 to use it...
Viewing 4 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply
This website stores cookies on your computer.
These cookies are used to improve your website experience and provide more personalized services to you, both on this website and through other media.
To find out more about the cookies we use, see our Privacy Policy