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
 Zipped data in sql field: what type?

Author  Topic 

phrankbooth
Posting Yak Master

162 Posts

Posted - 2007-01-31 : 13:07:10
I want to zip up some HTML and store it a field. 2 questions:

1: Are there any sample scripts available for this, I haven't found any?

2: What Type should the storage field be for that?

Thanks,
--PhB

--PhB

spirit1
Cybernetic Yak Master

11752 Posts

Posted - 2007-01-31 : 13:18:43
zip you data in the front end and save it in image or
varbinary(max) (sql server 2005)

you must pass it as byte array from the front end



Go with the flow & have fun! Else fight the flow
blog thingie: http://weblogs.sqlteam.com/mladenp
Go to Top of Page

phrankbooth
Posting Yak Master

162 Posts

Posted - 2007-01-31 : 13:42:19
Is there a kind of general type that covers all types so can pass in data to SP then figure out what the type is and deal with it accordingly?

In .Net this would be like the 'object' type.

--PhB
Go to Top of Page

SwePeso
Patron Saint of Lost Yaks

30421 Posts

Posted - 2007-01-31 : 13:45:22
Read about SQL_VARIANT.


Peter Larsson
Helsingborg, Sweden
Go to Top of Page

X002548
Not Just a Number

15586 Posts

Posted - 2007-01-31 : 14:00:29
Why not just save it to a file server? After all, that's what they are made to do...



Brett

8-)

Hint: Want your questions answered fast? Follow the direction in this link
http://weblogs.sqlteam.com/brettk/archive/2005/05/25/5276.aspx

Add yourself!
http://www.frappr.com/sqlteam



Go to Top of Page

Kristen
Test

22859 Posts

Posted - 2007-01-31 : 14:20:11
"Why not just save it to a file server?"

... and store the Path/Filename in your database, for example

Kristen
Go to Top of Page

phrankbooth
Posting Yak Master

162 Posts

Posted - 2007-01-31 : 16:38:40
Yeah great idea.

Thanks people.

--PhB
Go to Top of Page
   

- Advertisement -