dbTalk Databases Forums  

How to send data from local database to MySQL db on website

comp.databases.ms-access comp.databases.ms-access


Discuss How to send data from local database to MySQL db on website in the comp.databases.ms-access forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
JeffP
 
Posts: n/a

Default How to send data from local database to MySQL db on website - 07-08-2010 , 05:34 AM






Can't seem to find a start on this.

I have a hosted website with a MySQL database.

Locally, on my PC, I have an Access database.

I would love to be able to click a button and have data sent to the MySQL
database on the website.

Assumedly, the database needs to send this like a form data post from a web
page and have a PHP page on the website that receives it and updates the
MySQL database. But how do you get Access to mimic data submitted from a
website form?

All help appreciated.

Reply With Quote
  #2  
Old   
Bob Alston
 
Posts: n/a

Default Re: How to send data from local database to MySQL db on website - 07-08-2010 , 11:31 AM






Rick Brandt wrote:
Quote:
JeffP wrote:

Can't seem to find a start on this.

I have a hosted website with a MySQL database.

Locally, on my PC, I have an Access database.

I would love to be able to click a button and have data sent to the MySQL
database on the website.

Assumedly, the database needs to send this like a form data post from a
web page and have a PHP page on the website that receives it and updates
the MySQL database. But how do you get Access to mimic data submitted from
a website form?

All help appreciated.

You can use the Windows MSXML dll to make HTTPRequests from VBA code.
Why not fully convert to MySQL?

bob

Reply With Quote
  #3  
Old   
Banana
 
Posts: n/a

Default Re: How to send data from local database to MySQL db on website - 07-08-2010 , 11:42 AM



On 7/8/10 8:31 AM, Bob Alston wrote:
Quote:
Why not fully convert to MySQL?

bob
It should be pointed out that MySQL is just a database and doesn't have
any forms or reports... like SQL Server, so one cannot "fully convert to
MySQL" from an Access as an application. Sure, you could move data from
Access to MySQL (or any other RDBMS) but you still have to deal with the
application aspect that's not provided by any RDBMS.

Thus it would make more sense to say "convert to a PHP application"*.
However, I think the OP already indicate that there's a website so
there's already a PHP application. There is nothing wrong with using
Access as a front-end to MySQL, and as Karl mentioned, one could use
ODBC to connect directly to MySQL and thus avoid the need to send a POST
request to the PHP application. That would certainly be much simpler
than writing VBA to build the POST request via MSXML library.


*Doesn't have to be PHP - could easily be any other web scripting
language for all I know but that's the most common language used in
conjunction with MySQL.

Reply With Quote
  #4  
Old   
Bob Alston
 
Posts: n/a

Default Re: How to send data from local database to MySQL db on website - 07-08-2010 , 11:46 AM



Banana wrote:
Quote:
On 7/8/10 8:31 AM, Bob Alston wrote:
Why not fully convert to MySQL?

bob

It should be pointed out that MySQL is just a database and doesn't have
any forms or reports... like SQL Server, so one cannot "fully convert to
MySQL" from an Access as an application. Sure, you could move data from
Access to MySQL (or any other RDBMS) but you still have to deal with the
application aspect that's not provided by any RDBMS.

Thus it would make more sense to say "convert to a PHP application"*.
However, I think the OP already indicate that there's a website so
there's already a PHP application. There is nothing wrong with using
Access as a front-end to MySQL, and as Karl mentioned, one could use
ODBC to connect directly to MySQL and thus avoid the need to send a POST
request to the PHP application. That would certainly be much simpler
than writing VBA to build the POST request via MSXML library.


*Doesn't have to be PHP - could easily be any other web scripting
language for all I know but that's the most common language used in
conjunction with MySQL.
I meant to say convert the database portion of Access, the Jet database
part, to Mysql. That way you can still use the Access forms, queries
and reports just have the data all in one place.

Reply With Quote
  #5  
Old   
Banana
 
Posts: n/a

Default Re: How to send data from local database to MySQL db on website - 07-08-2010 , 11:49 AM



On 7/8/10 8:46 AM, Bob Alston wrote:
Quote:
I meant to say convert the database portion of Access, the Jet database
part, to Mysql. That way you can still use the Access forms, queries and
reports just have the data all in one place.
Ahh, I was under the impression that the OP already had all data in
MySQL, but yes, if that is not the case, then that's even worse as
there'll be synchronization issues that can be best avoided although.

Reply With Quote
  #6  
Old   
Rick Brandt
 
Posts: n/a

Default Re: How to send data from local database to MySQL db on website - 07-08-2010 , 02:21 PM



JeffP wrote:

Quote:
Can't seem to find a start on this.

I have a hosted website with a MySQL database.

Locally, on my PC, I have an Access database.

I would love to be able to click a button and have data sent to the MySQL
database on the website.

Assumedly, the database needs to send this like a form data post from a
web page and have a PHP page on the website that receives it and updates
the MySQL database. But how do you get Access to mimic data submitted from
a website form?

All help appreciated.
You can use the Windows MSXML dll to make HTTPRequests from VBA code.

Reply With Quote
  #7  
Old   
Bob Alston
 
Posts: n/a

Default Re: How to send data from local database to MySQL db on website - 07-08-2010 , 03:53 PM



David W. Fenton wrote:

Quote:
Have any of you ever worked with clients who have an Access database
and a MySQL-driven website? It really doesn't sound like it.

Actually, no. I have only used MySQL for PHP based web apps. I have
used Access/jet in windows apps. Have you? do you have experience that
would suggest against doing this?

Bob

Reply With Quote
  #8  
Old   
David W. Fenton
 
Posts: n/a

Default Re: How to send data from local database to MySQL db on website - 07-08-2010 , 03:54 PM



Rick Brandt <rickbrandt2 (AT) hotmail (DOT) com> wrote in
news:i14ccv$7fr$1 (AT) news (DOT) eternal-september.org:

Quote:
JeffP wrote:

Can't seem to find a start on this.

I have a hosted website with a MySQL database.

Locally, on my PC, I have an Access database.

I would love to be able to click a button and have data sent to
the MySQL database on the website.

Assumedly, the database needs to send this like a form data post
from a web page and have a PHP page on the website that receives
it and updates the MySQL database. But how do you get Access to
mimic data submitted from a website form?

All help appreciated.

You can use the Windows MSXML dll to make HTTPRequests from VBA
code.
But without something on the server side to consume those, what
would you be accomplishing? That is, there has to be a script to
handle the HTTPRequests you are sending to the website.

--
David W. Fenton http://www.dfenton.com/
usenet at dfenton dot com http://www.dfenton.com/DFA/

Reply With Quote
  #9  
Old   
David W. Fenton
 
Posts: n/a

Default Re: How to send data from local database to MySQL db on website - 07-08-2010 , 03:56 PM



Karl <karl3200 (AT) gmail (DOT) com> wrote in
news:47b29e08-0dae-4900-8936-f3c7c84cade7 (AT) w12g2000yqj (DOT) googlegroups.co
m:

Quote:
You can use ODBC.
With a website? Not with the normal website hosting packages, which
don't expose an external port for connecting to the database.

--
David W. Fenton http://www.dfenton.com/
usenet at dfenton dot com http://www.dfenton.com/DFA/

Reply With Quote
  #10  
Old   
David W. Fenton
 
Posts: n/a

Default Re: How to send data from local database to MySQL db on website - 07-08-2010 , 04:04 PM



Banana <Banana (AT) Republic (DOT) com> wrote in
news:4C35F1DF.1060909 (AT) Republic (DOT) com:

Quote:
On 7/8/10 8:31 AM, Bob Alston wrote:
Why not fully convert to MySQL?

bob

It should be pointed out that MySQL is just a database and doesn't
have any forms or reports... like SQL Server, so one cannot "fully
convert to MySQL" from an Access as an application. Sure, you
could move data from Access to MySQL (or any other RDBMS) but you
still have to deal with the application aspect that's not provided
by any RDBMS.

Thus it would make more sense to say "convert to a PHP
application"*. However, I think the OP already indicate that
there's a website so there's already a PHP application. There is
nothing wrong with using Access as a front-end to MySQL, and as
Karl mentioned, one could use ODBC to connect directly to MySQL
and thus avoid the need to send a POST request to the PHP
application. That would certainly be much simpler than writing VBA
to build the POST request via MSXML library.
Everyone assumes to be assuming way too much about the environment.

I happen to be working right now for a client whose inventory is
their Access app (that I built for them in 1997 and have been
updating and enhancing on a regular basis since then), and their
website has a MySQL database behind it. They don't want their
inventory database on their website, because they only put a subset
of their inventory on the website. So, the MySQL database is a slave
of the Access database.

Now, with normal Linux-based web hosting, you don't get an open port
to connect to the database externally, and that's a good thing! So,
it would be impossible to use ODBC to upload data to the website
database.

Instead, I have written PHP pages for adding and editing data that I
call via MS XMLHTTP calls.

And when the MySQL database is not on your local LAN/WAN or on a
website without a port that is publicly accessible from the Internet
(a gaping security hole, of course), then you must do the
interaction exactly as I described unless you want to do it
manually.

--
David W. Fenton http://www.dfenton.com/
usenet at dfenton dot com http://www.dfenton.com/DFA/

Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.