dbTalk Databases Forums  

Monitor and import CSV file only when date time changes

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


Discuss Monitor and import CSV file only when date time changes in the microsoft.public.sqlserver.dts forum.



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

Default Monitor and import CSV file only when date time changes - 09-08-2003 , 05:08 AM






Hi,

Is it possible using the DTS to monitor a CSV file and
import it into a table only when it has changed, i.e. the
date and time stamp.

Any help greatly appreciated

Martin

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

Default Re: Monitor and import CSV file only when date time changes - 09-08-2003 , 06:35 AM






Either

1. Periodically check the files in the directory and log their dates to a
table. On the next iteration you would check to see if this had changed.
OR
2. This is the way I would do it. In .Net use the FileSystemWatcher class
to look at the modified event for the text files in a directory.



--

----------------------------
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



"Martin" <martin4nospam (AT) yahoo (DOT) co.uk> wrote

Quote:
Hi,

Is it possible using the DTS to monitor a CSV file and
import it into a table only when it has changed, i.e. the
date and time stamp.

Any help greatly appreciated

Martin



Reply With Quote
  #3  
Old   
Martin
 
Posts: n/a

Default Re: Monitor and import CSV file only when date time changes - 09-08-2003 , 09:02 AM



Hi Allan,

We are not using .NET infrastructure

Would we use vb script in the DTS to watch the time and
date or is there a TransactSQL command to do this.

Can you give me some pointers to this as I have limited
experience with using the DTS, unless it is a wizard of
course.

Regards

Martin

Quote:
-----Original Message-----
Either

1. Periodically check the files in the directory and
log their dates to a
table. On the next iteration you would check to see if
this had changed.
OR
2. This is the way I would do it. In .Net use the
FileSystemWatcher class
to look at the modified event for the text files in a
directory.



--

----------------------------
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



"Martin" <martin4nospam (AT) yahoo (DOT) co.uk> wrote in message
news:3cde01c375f1$192a3330$a001280a (AT) phx (DOT) gbl...
Hi,

Is it possible using the DTS to monitor a CSV file and
import it into a table only when it has changed, i.e.
the
date and time stamp.

Any help greatly appreciated

Martin


.


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

Default Re: Monitor and import CSV file only when date time changes - 09-08-2003 , 09:07 AM



Have a look at this.

How to check the file date
(http://www.sqldts.com/default.aspx?238)

You would log details using ADO to SQL Server

You would loop through a directory using (Step 4)

Looping, Importing and Archiving
(http://www.sqldts.com/default.aspx?246)



--

----------------------------
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



"Martin" <martin4nospam (AT) yahoo (DOT) co.uk> wrote

Quote:
Hi Allan,

We are not using .NET infrastructure

Would we use vb script in the DTS to watch the time and
date or is there a TransactSQL command to do this.

Can you give me some pointers to this as I have limited
experience with using the DTS, unless it is a wizard of
course.

Regards

Martin

-----Original Message-----
Either

1. Periodically check the files in the directory and
log their dates to a
table. On the next iteration you would check to see if
this had changed.
OR
2. This is the way I would do it. In .Net use the
FileSystemWatcher class
to look at the modified event for the text files in a
directory.



--

----------------------------
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



"Martin" <martin4nospam (AT) yahoo (DOT) co.uk> wrote in message
news:3cde01c375f1$192a3330$a001280a (AT) phx (DOT) gbl...
Hi,

Is it possible using the DTS to monitor a CSV file and
import it into a table only when it has changed, i.e.
the
date and time stamp.

Any help greatly appreciated

Martin


.




Reply With Quote
  #5  
Old   
Darren Green
 
Posts: n/a

Default Re: Monitor and import CSV file only when date time changes - 09-09-2003 , 01:58 PM



In article <3f9701c37611$dccc6450$a001280a (AT) phx (DOT) gbl>, Martin
<martin4nospam (AT) yahoo (DOT) co.uk> writes
Quote:
Hi Allan,

We are not using .NET infrastructure
You can do this via Win32 APIs. Here is a VB 6 sample-

http://www.mvps.org/vbnet/code/filea...chedfolder.htm

--
Darren Green (SQL Server MVP)
DTS - http://www.sqldts.com




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.