|
-
Jul 21st, 2003, 06:52 AM
#1
Thread Starter
Fanatic Member
best way?
my intention is to check a folder every so often and take the .txt files one by one and transfer the data in the text files into a sql server database table.
Should I use DTS within vb.net or some other means?
Thanks
-
Jul 21st, 2003, 08:47 AM
#2
Fanatic Member
well the best way would be to use a file system watcher, whatever it's called....
It's just an object from a namespace that you will create, and basically whenever the contents of the directory change (creation, editing, deletetion, etc.) that you've subscribed your watcher to, the watcher will come back and tell you what has happened...
This is going to be a more efficient way of doing things than checking the directory at a timed interval...
http://www.vbforums.com/showthread.p...ectory+watcher
http://www.freevbcode.com/ShowCode.Asp?ID=4841
-
Jul 21st, 2003, 09:14 AM
#3
Well File system Watcher depends on if he wants to do something right when a change is made to a file or directory. He may want more of a scheduled task thing.
-
Jul 21st, 2003, 02:05 PM
#4
Thread Starter
Fanatic Member
Hi Guys,
Thanks for the reply but I am really after the actual data transfer from a text file to a table in sql server.
Should I use DTS within vb.net or some other means?
-
Jul 21st, 2003, 07:36 PM
#5
Addicted Member
More info please on or your situation in general. It the text file on the same comp as the database. Is it over a network? Do you want to schedule this. Are you using Com+ and Transactions?
Personally I like calling dts packages from SQL Stored procedures and calling the sprocs from my middle tier if you absolutly have to run one from your app. It gives you more options if the sheit hits the fan during data transfer. and keeps your data and business logic seperated like they should be in the first place.
If It is just a Database issue then Create the DTS Package on the database and Schedule it from there.
Last edited by MasterBlaster; Jul 21st, 2003 at 07:40 PM.
"And most of the evils of society can, in fact, be cured through information. We have a society that has been disinformed and based on the disinformation has made irrational choices. And that's what I mean by 'ignorance.' People, who ordinarily might be smart, are deprived of the data by which to make a rational decision, don't have the data to do it."
Frank Zappa
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|