Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

how to insert large data into the database remotely

Status
Not open for further replies.

ayladilara

Programmer
Apr 11, 2002
16
0
0
DE
I have to insert about 200 records into the database remotely every week. I have a bach file which consists of insert statements. How shall I call this file within the ASP pages so that it should be executed on the server and should insert the data into the relevant tables? Perhaps one solution is to create a stored procedure which has the bach file and call and execute it within the ASP pages through a button? Any better idea?

Many Thanks
 
Visual Basic Program would most likely be your best bet. www.vzio.com
ASP WEB DEVELOPMENT



 
Basically write a vb program to read the contents of the file, insert them into the db, and clear the file. Then either set it up as a scheduled task to run every week or set it up as a service to sleep for a week, run, go back to sleep.
The reason that an ASP page would be bad for this is because the ASP page could be visited twice in a week, not at all in a week, refreshed accidentally causing it to to run again, etc. It would be possible, but a lot of unnecessary trouble to do it this way.
What you could also do in your vb application is have it write a simple html file out to the web server directory with some information about the weekly run, ie how many records processed, etc. This way you will have a weekly log, or if you continue to append the same file, a lifetime batch log of all the work your little scheduled VB app is doing.

-Tarwn --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---
 
Many thanks,Tarwn! To be honest, I haven't devoloped internet applications with VB although I have done some windows programing with it. My question is :
Do I have to create DLL? On the other hand I can read the contents of the file( .sql file) within ASP through FSObject but how can I get it run on the SQL Server?

Cheers
 
If you truly want to use ASP (the solution above was no ASP whatso ever, it was an vb .exe application)

For information on databases and such you can go to the FAQs section above, or check out the thread concerning emailing a form by DaveMac in this forum, as I posted a large list of ASP/DB resources.

-Tarwn --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top