Click here to monitor SSC
SQLServerCentral is supported by Redgate
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
Posted Saturday, January 31, 2009 4:36 AM


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

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.

Post #647488
Posted Saturday, January 31, 2009 7:03 AM


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



Group: General Forum Members
Last Login: Today @ 8:10 AM
Points: 10,808, Visits: 14,835
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
At best you can say that one job may be more secure than another, but total job security is an illusion. -- Rod at work

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