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 wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Looking for resources

Status
Not open for further replies.

Rmcintosh

Programmer
May 22, 2002
2
CA
I have been asked to look into the possibility of using some kind of automated file import and database update (perhaps some kind of scheduling technique). The hope is to import, update and export a file over night without having to run the application. The only thing I can think of is trying some kind of scheduled stored procedure within the database itself but I don't know if this is possible. Does anyone have any suggestions as to possible resources I could use?

I want to determine if the process is
A) able to be done
B) what is involved
C) worth doing, as it will save only a few hours ( maybe one day).

It is a PB8 app using SQLAnywhere 5.0 database
Running on WinNT

 
You could always use the timer function and event of PowerBuilder. Then all you need to do is make sure the window using it is open and start the timer as the window is opened. Then check in the timer event if a certain time you have specified has passed and if so call a function or something that will execute your import or whatever data requirements it is you need to perform. Probably not the most effective solution to your problem, but at least a place to start.

Tentacle
 
I would definitely say this is worth your time, if it is one less thing on your plate... you can't be expected to stay on the leading edge of development if you are spending your time supporting things that should be automated.(Not to say that support is not important).
Having some experience on both sides of this fence. I would suggest looking at BCP (Bulk Copy).
You should be able to BCP the file directly into a temp table (Suggest using a temp table because you might incounter dupes in the file that would violate your Primary Key). Process those records accordingly into your 'main' table. Exporting should be similiar obviously without the need to use a temp table.

You should be able to scedule a job to do this whole process or one for the import and one for the export depending on your preference. In this instance I would attempt to handle this totally on the back-end.

WSMALL73
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top