Load txt to datbase repeatedly

  • Hi, I want to ask you, if is it possible to load data from txt to database always when new txt is created? I want to use T-SQL. Thanks

  • Any reason you don't want to use SSIS?

    └> bt



    Forum Etiquette: How to post data/code on a forum to get the best help[/url]

  • And can you advice me how can I execute procedure of MS SQL Server in VC++? Because I have filewatcher in VC++ and I want to wrtie watched data to database.

  • You can use a separate exe to watch the files and still use SSIS. The .NET languages have a built in FileSystemWatcher class so it's trivial to write a separate program to watch for new files and then fire the SSIS package to do the actual data import.

    If you really want to avoid SSIS for whatever reason, there are several ways to query the data from the text file directly with T-SQL. Look at BOL for the keywords sp_addlinkedserver and OPENROWSET.

    If you're asking how to code C++ to connect to SQL Server I'm guessing you're in the wrong place, but maybe someone here would be able to help you.

    └> bt



    Forum Etiquette: How to post data/code on a forum to get the best help[/url]

Viewing 4 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic. Login to reply