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
 SQL Server 2008 Forums
 Transact-SQL (2008)
 file loading

Author  Topic 

kiranmurali
Yak Posting Veteran

55 Posts

Posted - 2010-11-08 : 05:49:37
Hi,

I have to store a offer letter in my database which is a word document.

In that offer letter template the candiadte name,designation and date will be changing from person to person when ever from the front end if they click generate offer letter.it should store that information in the backend with all the details.

The standard format sholud be stored in the database.

can anyone help me in getting this issue fixed.


Thanks in Advance,
Kiranmurali.

Sachin.Nand

2937 Posts

Posted - 2010-11-08 : 05:54:25
So what exactly do you want?Its not quite clear.

PBUH

Go to Top of Page

kiranmurali
Yak Posting Veteran

55 Posts

Posted - 2010-11-09 : 00:26:02
i have to maintain the offerletter and appointment letter of an employee in the database..

1.The template for offer and appointment letter will be standard.
2.when the input arguments(like employeename,designation,date) were given from the front end it should be added in the backend.
3.First I have to store the standard template(word document) can anyone explain me how to add and view this document.

Thanks in Advance
Kiranmurali
Go to Top of Page

pk_bohra
Master Smack Fu Yak Hacker

1182 Posts

Posted - 2010-11-09 : 00:55:43
Why you want to store the ms-word document in the database.
Instead of that you can store the values like employeename,designation etc in a table and wherever you are displaying, just put the value there.

--Still you want to save complete letter info then
Alternate way is:
Declare a varchar(max) column in a table (what you are calling as standard format) and substitue the value.

Ex:

Declare @t varchar(max)

Set @t = '
Dear ##CandidateName##

This is to inform you that you are selected for ##CandidatePosition##

'

--Before saving you can use replace function
Set @t = Replace(@t,##CandidateName##,TheNameyouwant)
--Like wise you can replace the other fields also.

Note: This is just an alternate approach and may not be the best one.


--Still if you wish to save the word document then have a look at
http://weblogs.sqlteam.com/peterl/archive/2007/09/26/Insert-binary-data-like-images-into-SQL-Server-without-front-end.aspx


Go to Top of Page
   

- Advertisement -