By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
434,949 Members | 2,038 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 434,949 IT Pros & Developers. It's quick & easy.

Can one call an Access database on computer using the IP address?

P: n/a

An old friend of mine recently approached me and said something like:
"I've a computer at my office that has an Access database running on
it. We've most of our company info in there. We'd like to put a portion
of it online as a dynamic site, but we don't want the database to leave
our office. Our office is connected to the Internet through a static
IP. Can you do it?"

I said no, but I also said I'd look into it. Could a PHP script running
on a web server make a call to that database to get info? How does that
work?

Jul 29 '05 #1
Share this Question
Share on Google+
8 Replies


P: n/a
lk******@geocities.com wrote:
An old friend of mine recently approached me and said something like:
"I've a computer at my office that has an Access database running on
it. We've most of our company info in there. We'd like to put a portion
of it online as a dynamic site, but we don't want the database to leave
our office. Our office is connected to the Internet through a static
IP. Can you do it?"

I said no, but I also said I'd look into it. Could a PHP script running
on a web server make a call to that database to get info? How does that
work?

This is possible using and ODBC connection. The process for setting up
the ODBC dsn for the remote database server depends on what the target
o.s is. From the php side, you may want to look at the ODBC function,
starting here:

http://www.php.net/manual-lookup.php...n=odbc&lang=en

Whether it is a good idea or not is a totally different question, and
depends on alot of variables.

Carl.
Jul 29 '05 #2

P: n/a
>An old friend of mine recently approached me and said something like:
"I've a computer at my office that has an Access database running on
it. We've most of our company info in there. We'd like to put a portion
of it online as a dynamic site, but we don't want the database to leave
our office.
Whoever laid down the rule "we don't want the database to leave our
office" is likely to be horrified by your proposal, unless, of
course, they thought up the idea of having the web site in the first
place. Be careful that you aren't fired just for thinking about
it.
Our office is connected to the Internet through a static
IP. Can you do it?"

I said no, but I also said I'd look into it. Could a PHP script running
on a web server make a call to that database to get info? How does that
work?


It looks like you need ODBC on both the PHP side and the server side.

Unless you have absolutely *NO* security (pretty horrifying thought
if you have "most of our company info" on there), you need to
instruct the server end to allow access from the web server.

Gordon L. Burditt
Jul 29 '05 #3

P: n/a
On 29 Jul 2005 12:03:13 -0700, lk******@geocities.com wrote:

An old friend of mine recently approached me and said something like:
"I've a computer at my office that has an Access database running on
it. We've most of our company info in there. We'd like to put a portion
of it online as a dynamic site, but we don't want the database to leave
our office. Our office is connected to the Internet through a static
IP. Can you do it?"

I said no, but I also said I'd look into it. Could a PHP script running
on a web server make a call to that database to get info? How does that
work?


To add to the other posts - yes, it can be done via ODBC - but there
are definite security risks.

1) Ensure your database is *outside* web space.
2) Use some sort of passwording/authentication.
3) Check that your scripts don't allow for SQL exploits, where
malicious users could wipe your data.
4) Keep *regular* backups of the database on another machine that is
not visible from outside.

If security isn't an issue, it's a fairly straightforward process -
though the precautions above are still worth implementing.

Adam.
Jul 29 '05 #4

P: n/a
NC
lk******@geocities.com wrote:

An old friend of mine recently approached me and said something like:
"I've a computer at my office that has an Access database running on
it. We've most of our company info in there. We'd like to put a portion
of it online as a dynamic site, but we don't want the database to leave
our office. Our office is connected to the Internet through a static
IP. Can you do it?"

I said no, but I also said I'd look into it. Could a PHP script running
on a web server make a call to that database to get info? How does that
work?


Sounds doable with ODBC, as other posters have noted already. Define
the Access DB as an ODBC source, have the server running PHP connect
via ODBC. Security would obviously be an issue, and, possibly, so
would performance. The way the task is defined right now, ASP may
end up delivering better performance compared to a non-Microsoft
solution such as PHP.

Now, if I were you, I would ask your friend a question: you are not
comfortable with the DB leaving the office, yet you are willing to
allow anyone with a browser to poke around it? You friend should
consider separating the office data from Web-accessible data.
The data still doesn't have to leave the office (Web-accessible
DB server can be kept on premises), but accidental corruption or
deliberate hack would only destroy the copy, not the master database.

Cheers,
NC

Jul 30 '05 #5

P: n/a
On 29 Jul 2005 20:11:16 -0700, NC wrote:
lk******@geocities.com wrote:

An old friend of mine recently approached me and said something like:
"I've a computer at my office that has an Access database running on
it. We've most of our company info in there. We'd like to put a portion
of it online as a dynamic site, but we don't want the database to leave
our office. Our office is connected to the Internet through a static
IP. Can you do it?"

I said no, but I also said I'd look into it. Could a PHP script running
on a web server make a call to that database to get info? How does that
work?


Sounds doable with ODBC, as other posters have noted already. Define
the Access DB as an ODBC source, have the server running PHP connect
via ODBC. Security would obviously be an issue, and, possibly, so
would performance. The way the task is defined right now, ASP may
end up delivering better performance compared to a non-Microsoft
solution such as PHP.


I haven't used ASP for a while, but I have created a few ODBC/PHP
sites. None of them have been *mega* busy sites and performance was
absolutely no problem.

I suspect that, as it will only be available to a select few <??> then
performance (with respect to concurrent users) wouldn't be much of a
problem. The only differences may occur if your d/b is *huge* - but
then carefully designed queries can still help.

Adam.
Jul 30 '05 #6

P: n/a
> You friend should
consider separating the office data from Web-accessible data.
The data still doesn't have to leave the office (Web-accessible
DB server can be kept on premises), but accidental corruption or
deliberate hack would only destroy the copy, not the master database.


That is good advice. I thought about doing a little PHP script that
would sit on the database machine in the office and every hour would
pull stuff out of the Access database and upload/input it to a MySql
database on the web. Then we could do straightforward PHP/MySql stuff
on the web and I'd feel like I was back on home turf (PHP/MySql being
more comfortable for me than Access).

Making a copy is a good, defensive idea, though I understand that as
soon as one starts making copies, the problem of keeping them
synchronized then becomes a pain.

Aug 5 '05 #7

P: n/a
>I haven't used ASP for a while, but I have created a few ODBC/PHP
sites. None of them have been *mega* busy sites and performance was
absolutely no problem.


It would be a low volume site, so performance would not be much of an
issue. It's mostly for dealers who have a commercial relationship with
the company. The site would be unlikely to get more than 100 visits a
day for at least the next 2 years.

When I go to www.php.net I notice that PHP has a large number of built
in functions for dealing with MS SQL Server but it doesn't seem to
have any for dealing with Access. Did I miss them?

Aug 5 '05 #8

P: n/a
NC
lk******@geocities.com wrote:

It would be a low volume site, so performance would not be much of an
issue. It's mostly for dealers who have a commercial relationship with
the company. The site would be unlikely to get more than 100 visits a
day for at least the next 2 years.
Which begs a question, how often should the site be updated if you
and your friend decide to run it on MySQL periodically updated from
Access? It seems to me that daily updates (rather than hourly ones
you mentioned as a possibility in another post) may work just fine.
You can program the update facility to run at night, when the load
on the Access system is minimal, if any.
When I go to www.php.net I notice that PHP has a large number of built
in functions for dealing with MS SQL Server but it doesn't seem to
have any for dealing with Access. Did I miss them?


Yes. The keyword is ODBC: http://www.php.net/ODBC

Cheers,
NC

Aug 6 '05 #9

This discussion thread is closed

Replies have been disabled for this discussion.