开发者

how to do attachments for each sql record in c#

I am developing a desktop application in c# & sql 2005. With candidate data entry form I want to provide option to attach required documen开发者_如何学Pythonts(in pdf format) wid data. Kindly let me know the best method. Thank you in advance.


Well then unfortunately you have to either manage the file storage yourself using the servers file system, or you could store it in the db itself (IT WILL GET BLOATED!!!)

See sql server 2005 file storage

How To: Encrypt and Manage Documents with SQL Server 2005

OK, then for file management

see this example

File Manager Component


Simply create a table that will contain the filename and server path for the file to be attached, then create a method to copy the attached file to the server location and store the relivant information (name and path) in the table. Use other methods to retrive the file from the server location when requested. Simple.

I personaly prefer to store the documents as BLOBs since server file structures and paths can change over time.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜