MySQL Forums
Forum List  »  Microsoft Access

Re: Using Microsoft Access as a Front-end to MySQL
Posted by: Dave Schomburg
Date: May 25, 2009 05:12PM

I have a solution (part of one). In my situation we use a 3rd party web host that uses cPanel for their web admin gui. The web host has a connection time out set at 60 seconds and they won't change it due to being a shared server. Thus producing the #2006 error "connection has gone away" -cuz it did.
Using ADO I am able to make a connection via the myODBC 5.1 like this;
This is for deleting all the records in a table
-------------------------------------
myodbcconn = "Driver={MySQL ODBC 5.1 Driver};Server=xx.xx.xxx.xx;Port=3306;Database=thmysqldatabasename;User=yourusername; Password=yourpassword;Option=3;"
Dim adoConn As ADODB.Connection
Dim adoRS As ADODB.Recordset
Set adoConn = New ADODB.Connection
Set adoRS = New ADODB.Recordset
Dim strSql As String
strSql = "DELETE yourmysqltable.* FROM yourmysqltable;"
adoConn.Open myodbcconn
adoRS.Open strSql, adoConn
Set adoRS = Nothing
Set adoConn = Nothing
Set adoConn = Nothing
-------------------------------------

I said "part of one" because I'm still working on a way to insert a local source table into the remote mySQL table using ADO

Options: ReplyQuote




Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.