dbTalk Databases Forums  

Import a text when it is updated

microsoft.public.sqlserver.dts microsoft.public.sqlserver.dts


Discuss Import a text when it is updated in the microsoft.public.sqlserver.dts forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Mindy Zhang
 
Posts: n/a

Default Import a text when it is updated - 11-10-2003 , 03:38 PM






Hi,

Can SQL Server 2000 find a text file has been updated and import the updated
text file to the database table?

Thanks.

Mindy



Reply With Quote
  #2  
Old   
Sue Hoegemeier
 
Posts: n/a

Default Re: Import a text when it is updated - 11-10-2003 , 07:10 PM






Kind of broad but one basic approach would be to use a
control table to store the last updated date of the file.
You can have a job that runs however often which uses the
FileSystemObject to check the files DateLastModified
property, compare what you have in the table with the
DateLastModified. If DateLastModified is different, execute
a DTS package to import the file.

-Sue

On Mon, 10 Nov 2003 16:38:05 -0500, "Mindy Zhang"
<mindyzhang (AT) hotmail (DOT) com> wrote:

Quote:
Hi,

Can SQL Server 2000 find a text file has been updated and import the updated
text file to the database table?

Thanks.

Mindy



Reply With Quote
  #3  
Old   
Allan Mitchell
 
Posts: n/a

Default Re: Import a text when it is updated - 11-11-2003 , 04:36 AM



The approach I use is to use the FileSystemWatcher class in .Net and use the
events from that to note if a file has been changed.

--

Allan Mitchell (Microsoft SQL Server MVP)
MCSE,MCDBA
www.SQLDTS.com
I support PASS - the definitive, global community
for SQL Server professionals - http://www.sqlpass.org


"Mindy Zhang" <mindyzhang (AT) hotmail (DOT) com> wrote

Quote:
Hi,

Can SQL Server 2000 find a text file has been updated and import the
updated
text file to the database table?

Thanks.

Mindy





Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.