adding records to a database using ftp on a web server

Hello all

I was wondering if there is any possible way of adding a record to a database on a web server at the click of a button.

My circumstances are these:

At the moment i am designing an intranet.

When the user add's a job to the intranet it shall then automatically update the database on the web server.

This means it will have to update 2 tables:

Intranet table
Web Server table

I would appreciate any help

Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Some more information would be helpful... specifically...

What kind of network architecture are you working with?  Is there a firewall or some other barrier between your intranet server and the web server that would make and ODBC, OLE DB, or some other similar db connection impossible?

Also, what database platform are you using?
If you’re uploading files to a directory via ftp, then <cfdirectory> can read and report on the contents of that directory.

You could set a scheduled task to check the directory. The results from <cfdirectory> can easily be added to a database.
ok u could do something like ....

in the intranet update the table after a job is added.

and then query the table and get all the jobs and corresponding details from the table in a list

<cfquery name="qry_jobs" datasource="dsn name">
   select * ffrom jobs

now write this to a file

<CFFILE ACTION="WRITE" FILE="c:\somewhere\jobdetails.cfm" OUTPUT="
   <cfset Lst_JobID = ""#ValueList(qry_jobs.jobID,'~')#"">
   <cfset Lst_JobDetail = ""#ValueList(qry_jobs.JobDetail,'~')#"">
   similarly other details


then write this code
         SERVER = ""
<!--- in the place of the ip given put ur web servers ip address --->
      ACTION = "putfile"
      CONNECTION = "Anand"
      LOCALFILE = "c:\somewhere\jobdetails.cfm"
      REMOTEFILE = "jobdetails.cfm"
      Error in connection

PS: there should be a ftp connection created on the remote server.

for creating an ftp connection go to the IIS of the web server and add a ftp site
in the tab virtual directory
choose a directory on this computer..

and give the physical path to the folder where u will ftp the file created above..

and in the web server keep a scheduled file that will read this file and insert the data into the database..


The 7 Worst Nightmares of a Sysadmin

Fear not! To defend your business’ IT systems we’re going to shine a light on the seven most sinister terrors that haunt sysadmins. That way you can be sure there’s nothing in your stack waiting to go bump in the night.

oh a small chang in the above code
change this part
      ACTION = "putfile"
     CONNECTION = "Anand"
      LOCALFILE = "c:\somewhere\jobdetails.cfm"
     REMOTEFILE = "jobdetails.cfm"


      ACTION = "putfile"
     CONNECTION = "RemoteServer"
      LOCALFILE = "c:\somewhere\jobdetails.cfm"
     REMOTEFILE = "jobdetails.cfm"


Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
ic., correct me if i'm mis understand your case :
first add another datasource which connects to the other datbase and then just replicate the query and change the datasource : ) you don't have to upload it... but i recommended u to use MYSQL for your database! so that you'll not get much trouble!

gud day!
by the way if you tried it... you must first set an access to your IP address on ur intranet or wherever your localserver is! just read this >
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Web Servers

From novice to tech pro — start learning today.