ColdFusion Programming/updating a remote database

Advertisement


Question
QUESTION: I read your answer to the previous question and it made me think of my own question. This may be a lttle unfocused as i am a beginner at cold fusion. But...

Let say i own a database, it is on the web and it has a column in common with another database. Like, they both have a column for number of sick days an employee has. My database is one the web, and theirs may or may not be. It could be in a computer in a payroll departemt without internet access. Or it might be on the web. I am realizing now that there would have to be a key that is the same for both databases, and that would be their employee number.

OK, here's the question. My database has been collecting data all month and I want to be able to take my column and ovewrite theirs, just in the one column.

Can this be done if they are both on the web and i have the appropriate password?

Can this be done by sending them a file and having them update it?

Thank you so much and hope you have a good vacation.


ANSWER: There are ways to do this such as sending a file and having them update it. If there db is on the internet you could also upload the data to the internet and then run some code that would move it from your db to theirs.
In the 1st case, the columns have to match or you will get an error.
In the 2nd cases you don't have to have a common key, you just have to write the code so that it puts the right data in the right place.

---------- FOLLOW-UP ----------

QUESTION: Do the two databases have to be the same (access and access, etc) to have data from two columns overwrite the other database's two columns?

For the case when i burn a copy of the web database and send the cd to the people who have a database offline, how would they get those columns from the disk to overwrite their columns?

Is it easier for them if my database is the same brand as theirs?  

Answer
No, they don't have to be the same. You would have to be able to import the table tho. The problem being that you can't just import or even copy 1 column at a time. You have to do entire tables. Thus the incoming table must be a clone of the target table with the exception of the data.  All data in the standing table will be deleted and the new data written in.

If you do it programatically this won't happen, you will just have it find the matching entry and make the appropriate changes. This means there has to be unchanging primary key that is the same in both dbs.

ColdFusion Programming

All Answers


Answers by Expert:


Ask Experts

Volunteer


Donald Hammond

Expertise

Expert in ColdFusion, Flash ActionScript, XML, and SQL.

Experience

Cold Fusion, Flash Action Script

©2012 About.com, a part of The New York Times Company. All rights reserved.