i know how to save a text file to a sql database, the problem is on when will be the process is executed because i need to monitor the operation of an existing system..

i will develop a program that catches an event from an external app. then save the textfile data to sql

okay i'll give you an example

there is an existing system that checks the static energy of a person and a text file database,
once the static checking process is finished the existing system will save the information to a text file

then

the system that I will develop will fetch the data from the textfile..

get it?

or should I say the system that I will develop will save only the textfile to database after the process from the external application finishes

which part you are struck up with ?

1. read the content from the text file.
2. write to database.

it should be that simple.

the part that when will be my program will execute the saving to sql..

it's the "when" , my program should execute "only" when the external programs process ends, it's kinda what event should I use, i'ts like my program will run in background and monitors the process of the existing system..

Are you going to insert every thing from the text file into a table or update a single field of a table based on data in text file ?

well, that's another problem.. because i don't want any records to be duplicated..
I need to stick on what my client want to happen so i'm really on to how to figure out, it's like my program only reacts after the external program ends a certain process

ahuh and that's another thing I should think about, sir maybe for now let's assume that the process is executed properly when that certain window is closed..

How the application knows what is the status of the execution of external process ?

Are you setting any flag ?

no,

man i'm stuck haha! sorry for being lame, i'm new to this interaction to an external program

can you suggest something that determines the process of that external application

Edited 5 Years Ago by aldeene: n/a

Consider this and check if this suits your requirement.

Tables structure

Person
(id,
name,
field3,
field4,
..........
static_energy,
se_status)

1. Initially insert al other details into the Person table except statis_energy column and set the se_status to 0.
2. when the external process runs creat the output into a text file with name same as ID of the person and update the status in the table to 1.
continue this process for all other person details.
3. Run a procedure to read the text file and update the static_energy column of the corresponding record (based on ID).

ahuh and that's another thing I should think about, sir maybe for now let's assume that the process is executed properly when that certain window is closed..

You keep accepting all options, it appears you've not stated clearly what you want to do. That's the first thing to do

You keep accepting all options, it appears you've not stated clearly what you want to do. That's the first thing to do

hmmmm.. because those options are possible?, I think i'm on the right path, but, that existing application that comes with the machine gives me the problem, I don't know how can my program will react everytime that machine finishes a certain process..

trying to do it, but i don't have any control regarding to the saving of the external program, now i've stopped doing this project because it's really not necessary, maybe i'll comeback next tim

This question has already been answered. Start a new discussion instead.