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..

Recommended Answers

All 17 Replies

What exactly you are trying to do ?

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

Generally how you determine if the external process executed properly or not ?

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 ?

yes, if the process ends theres a flag that returns true

Is that being stored anywhere in the DB ?

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

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..

Have you tried as i suggested in my previous post ?

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

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.