You are here: Re: Store program EXE in table? « MsSQL Server « IT news, forums, messages
Re: Store program EXE in table?

Posted by Erland Sommarskog on 06/08/06 21:41

HC (hboothe@gte.net) writes:
> Is there some way that I can either a) store my program files (one EXE
> approximately 5MB in size and one OCX approximately 250KB in size) in a
> table to be retrieved by my application so it can update itself or b) a
> way to get SQL Server (MSDE) to read a file locally on the server and
> return it to my application just like it would any recordset so I could
> just tell it where the file was and let it read it from whichever
> folder it's stored in?

No, SQL Server cannot (easily) read a file from the network and pass it on
the server. After all, SQL Server is a database server, not a file server.

> I've looked at making a column of datatype Binary, and perhaps that's
> the way I'll go (re-creating the field to the correct size each time I
> do an update or perhaps making it really big so I don't have to worry
> about the size). But I thought I'd ask around first since this isn't
> anything I know much about.

You could have to use the image data type, as binary is restricted to
8000 bytes. The image data type is fairly kludgy to work with.

Overall, while this could be made working, this does not sound like a
good design to me. A solution that involves only the file system is a
lot better in the long run, although there appears to be some hassle
with it right now. Yet another alternative would be to write your own
server app that accepts a connection from the application, and sends
a binary in reply if there is a newer one.


--
Erland Sommarskog, SQL Server MVP, esquel@sommarskog.se

Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/prodtechnol/sql/2005/downloads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodinfo/previousversions/books.mspx

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация