简体   繁体   中英

How to sync a database field's content with a text file's content?

Here's the situation: we're building our own CMS, and what the boss wants is using a system like Dropbox (local), in order to synchronize the content of CMS documents with the developer's local text files (Something like using SVN, but instead of using File system to store the content of the CMS document's source code, use the DB). We're using MS SQL Server 2005 to store the content, and that's where the tricky part is: how to edit a text file, save it and it appears in the required database field.

The following T-SQL technique could be the solution: The TSQL of Text Files

But the boss said 'avoid using this, and any other text-file-to-db, db-to-text-file technique'. So he wants something already done, simply to skip the logging in the CMS and editing the CMS document, instead edit a local file, save it and .. done.

It sounds impossible to me (if we don't use the T-SQL technique), I did a 2 week research before writing this, but it's worth a shot, you're the bests here.

Write a client application to get the text file process it and synchronize it with database. like an intermediate program.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM