Last post Jan 09, 2011 10:50 AM by dt845
Jan 07, 2011 05:09 PM|dt845|LINK
I am creating a simple Website where users will update SQL database. The website works fine however, new records in the SQL database records needs to appended every night from a text file. What is best way to append records in the background every night?.
I have created a stand alone vbscript to append the recoeds to the table in SQL Database hoping to schedule it to run every night but the problem I am facing is when users are using the Website my vbscript fails with the message "The file is being used by
How should I approach this problem? perhaps mutli threading - batch processing...
Jan 07, 2011 09:56 PMfirstname.lastname@example.org|LINK
I am not exactly sure why you are getting this error if you are attaching your connection string to the server and not the file then you shouldnt have any issues at all.
The best way to handle this would be through a windows application, stand alone from your website. Although you can do this via your website with some interesting experiments its not usually the quickest thing to implement.
However I have a shell application that have used a couple times that is a windows forms application that allows you to enter a time of day, output directory, file name and wether to append the date to the file name. This is a simple application that uses
a timer and threading to batch process anything.
However it is written in C#, you are welcome to download it and have a look.
It is relatively simple to use. Let me know if you have any issues
Jan 08, 2011 06:59 PM|dt845|LINK
Thanks for the prompt response. I am using builtin SQL 2008 express that is bundled with VS 2010.
I would love to see your application but the link you provided seems to be broken.
Jan 08, 2011 08:08 PMemail@example.com|LINK
Here is a new link for you. Its a very basic shell application, there is a method called DoWork that you can put your code into for the batch processing, however it is written in C#, a vb.net conversion should be easy todo. Cheers
Jan 09, 2011 10:50 AM|dt845|LINK
Thanks a lot for the link. I have downloaded your project.