Rocky Smolin at Beach Access Software
rockysmolin at bchacc.com
Mon Jul 9 18:18:57 CDT 2007
Steve: Thanks for the snip. Raises a few more questions than it answers. Like how does the user know the Server Name. San with the DNS. And I suppose I'd have to prompt for those values. Most of my users are not very adept with computers, although in a company using MySql would I expect to find a DBA on staff? Rocky -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Steve Schapel Sent: Monday, July 09, 2007 1:16 PM To: Access Developers discussion and problem solving Subject: Re: [AccessD] Converting to MySql Rocky, I have not done this from the point of view of MySQL database as either/or to Jet database. But I have a couple of apps that link to MySQL tables *and* Jet tables, and transfer data one to the other via Update queries or Append queries etc. The link to the MySQL database is via ODBC, so you need the appropriate MySQL ODBC driver installed, and the creation of a DSN (well, I think you can do it dsn-less as well). So I imagine what you are trying would be reasonably easy. If the user chooses the MySQL BE, then delete the linked Jet tables, and create the links to the MySQL tables. Here is a sample of the code I have used to link to MySQL talbes: Dim dbs As DAO.Database Dim tdf As DAO.TableDef Dim tblName As String Dim srcTblName As String Dim Conn As String Set dbs = CurrentDb tblName = "NameYouWantTheTableToHaveLocally" srcTblName = "NameOfTheMySQLTableToLinkTo" Conn = "ODBC;DATABASE=NameOfMySQLDatabase;DESCRIPTION=description;DSN=NameOfDSN;OPT ION=0;PORT=3306;SERVER=NameOfServer;;TABLE=NameOfTheMySQLTableToLinkTo" Set tdf = dbs.CreateTableDef(tblName) tdf.SourceTableName = srcTblName tdf.Connect = Conn dbs.TableDefs.Append tdf dbs.TableDefs.Refresh I guess one potential hiccup could be the use of non-corresponding data types. Regards Steve Rocky Smolin at Beach Access Software wrote: > Dear List: > > I have a request to make my manufacturing package compatible with > MySql. I use some bound forms, and a lot of DAO. The app is split > FE/BE with linked tables pointing to the BE. I also allow the user to > select the BE they want so they can run multiple BEs if desired. > > What would be involved in doing this? Would it be enough of a rewrite > that it would require a separate product? Or can the current product > be made 'switchable' between an Access BE and a MySql BE? -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com No virus found in this incoming message. Checked by AVG Free Edition. Version: 7.5.476 / Virus Database: 269.10.2/891 - Release Date: 7/8/2007 6:32 PM