Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

what is the datatype to store all type of data(image,binary.....) into database column Expand / Collapse
Author
Message
Posted Saturday, January 31, 2009 4:36 AM
SSC-Enthusiastic

SSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-Enthusiastic

Group: General Forum Members
Last Login: Wednesday, December 2, 2009 12:19 AM
Points: 108, Visits: 248
hi,

I have one document with full of data how to store this document in database table column.

which datatype I can take to insert data in data table.


Thanks
Dastagiri.D
Post #647488
Posted Saturday, January 31, 2009 7:03 AM
Grasshopper

GrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopper

Group: General Forum Members
Last Login: Tuesday, May 12, 2009 4:56 AM
Points: 12, Visits: 36
hey what i think is you have variable type of data in your document. you definately need to select proper data type for data. if you have numeric value then select numeric or int whatever suits you. but if you want character data type with support for unicode then you should opt for nvarchar data type.
Also if you are using sql server 2005 and if you can format your document to XML format then you can use XML data type which wud directly save your file into single column.
This is the best option for saving the data.
Post #647499
Posted Saturday, January 31, 2009 7:31 AM


SSChampion

SSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampion

Group: General Forum Members
Last Login: Yesterday @ 10:50 AM
Points: 11,264, Visits: 13,022
Can you provide some more details? Are you trying to store a document (word, pdf, etc...)? If you are attempting to store a document you need to use the varbinary datatype. You should do some research on storing blobs in SQL Server as it is usually not the best choice for large documents.



Jack Corbett

Applications Developer

Don't let the good be the enemy of the best. -- Paul Fleming

Check out these links on how to get faster and more accurate answers:
Forum Etiquette: How to post data/code on a forum to get the best help
Need an Answer? Actually, No ... You Need a Question
How to Post Performance Problems
Crosstabs and Pivots or How to turn rows into columns Part 1
Crosstabs and Pivots or How to turn rows into columns Part 2
Post #647503
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse