Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Connecting an Access DB to a Godaddy hosted MySQL database...

Status
Not open for further replies.

SnayJ

Programmer
Feb 27, 2008
65
US
As the subject says, I have an Access Database being used on my computer... I want to connect to a MySQL database I created on a Godaddy hosted server, of which I am the admin of. I want to query the db to validate subscription status.

Access database has a field in a table for the users email address (which is how their subscription is recorded).

MySQL database has a few fields, but for the query I need to pull 2 fields (EMAILADDRESS, DATEENDING), with this I can determine if the user (by EmailAddress) is still authorized to use the Database(by DateEnding).

Can this be done in VBA code on the MAINfrm_Open Event? And if so, can I get some help with the connection string? I would imagine my SELECT qry would be:

Code:
Dim VALIDATEsql
VALIDATEsql = "SELECT * FROM `PGRMAUTH` WHERE `MEMBERID` = " & forms!MAINfrm!MAINSUBfrm!MEMBERSEMAILbox.value  '<-----Used the MyPHPAdmin SQL builder within the   
                                                                                                               'database management tools to build that.  I know 
                                                                                                               'it's different than the way I would write it in VBA 
                                                                                                               'Code for SQL queries of my local tables.
 
I'm probably not reading this correctly but couldn't you just set up a local system or user ODBC connection to the remote MySQL server and then link the necessary table within Access? (This would depend on Godaddy's allowance for you to make remote connections to their MySQL servers...some discount hosts do not offer this ability.)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top