hosted by liquidweb


Go Back   Web Hosting Talk : Web Hosting Main Forums : Programming Discussion : MS Access to Mysql PHP
Reply

Programming Discussion Discussions related to web programming languages and other related issues. Topics may include configuration, optimization, practical usage and database connectivity.
Forum Jump

MS Access to Mysql PHP

Reply Post New Thread In Programming Discussion Subscription
 
Send news tip View All Posts Thread Tools Search this Thread Display Modes
  #1  
Old 06-15-2011, 08:04 AM
Danny159 Danny159 is offline
Web Hosting Evangelist
 
Join Date: Aug 2007
Location: Oakham England
Posts: 454

MS Access to Mysql PHP


Hey,

Is there any way of looping through data in a MS Access Database and inserting it into a mysql DB?

Dan

__________________
Streama - Your WordPress Friend
http://www.streama.co.uk

Reply With Quote


Sponsored Links
  #2  
Old 06-15-2011, 09:05 AM
fabin fabin is offline
Web Hosting Evangelist
 
Join Date: Mar 2009
Location: Gods Own Country
Posts: 530
you can connect to msaccess db using PHP and ODBC

__________________
Fabin M @ Xieles Support
High Quality Server Management | support @ xieles.com
http://xieles.com

Reply With Quote
  #3  
Old 06-15-2011, 09:15 AM
lynxus lynxus is offline
Lord of live chats
 
Join Date: Jul 2009
Location: UK
Posts: 1,225
Quote:
Originally Posted by Danny159 View Post
Hey,

Is there any way of looping through data in a MS Access Database and inserting it into a mysql DB?

Dan
Is this simply a case of migrating the database?
http://dev.mysql.com/tech-resources/...tive-grid.html

Otherwise then yeah, there is a way...

Setup a connection to your access db , While through the data and on every iteration do an insert using php/..

http://www.tizag.com/mysqlTutorial/

__________________
Live support chat software -> IMsupporting.com
█ Talk to your visitors in real time, Increase sales.

Reply With Quote
Sponsored Links
  #4  
Old 06-15-2011, 07:42 PM
raulgonzalez raulgonzalez is offline
Web Hosting Guru
 
Join Date: Jul 2003
Location: laredo
Posts: 266
Try this

PHP Code:
 
<?php
//do a mysql connection here

//then connect to access using the following
$conn = new COM("ADODB.Connection") or die("Cannot start ADO"); 
    
// Microsoft Access connection string.
    
$conn->Open("DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=g:\\path\\to\\your\\database.mdb");
    
// SQL statement to build recordset

    
$rs $conn->Execute("SELECT * FROM access_table WHERE something = '{$something}' ORDER BY something");
 
    
$ID $rs->Fields("ID");
    
$something $rs->Fields("something");
    
    
$ID $ID->value;
    
$something $something->value;

////////////////////at this point you do the insert to your mysql//////////////////
//mysql insert statement here
////////////////////at this point you do the insert to your mysql//////////////////

    
$rs->MoveNext();
    } 

    
$rs->Close(); 
//close mysql connection here
?>
 
I don't use it for that purpose since I have an export utility but I do use it on a page to select records from a mdb

Reply With Quote
  #5  
Old 06-16-2011, 01:00 AM
Lincxu Lincxu is offline
Disabled
 
Join Date: Nov 2010
Posts: 2,579
If you just like to migrate access to mysql. there's a tool, just search "ms access to mysql".

Reply With Quote
  #6  
Old 06-16-2011, 02:22 AM
centauricw centauricw is offline
Web Hosting Guru
 
Join Date: Jul 2008
Location: Atlanta GA
Posts: 291
One word of warning when moving from Microsoft SQL (any of them) to MySQL. Database/Table/Column names in Microsoft are not case-sensitive, but they are case-sensitive in MySQL. If your web code doesn't use a consistent case the queries, things that worked on Microsoft will break on MySQL.

Reply With Quote
  #7  
Old 06-18-2011, 05:48 PM
Eiolon Eiolon is offline
Web Hosting Evangelist
 
Join Date: Dec 2001
Location: Arizona
Posts: 549
I used Bullzip to go from MS Access to MySQL with no problems.

Reply With Quote
Reply

Similar Threads
Thread Thread Starter Forum Replies Last Post
Question About Visual Basic, Access and PHP and MySQL. Rosamunda Programming Discussion 6 05-02-2007 05:17 PM
MS Access or PHP/MySQL Dev. needed ADesign Employment / Job Offers 1 03-14-2006 07:16 PM
only php can't access mysql Lem0nHead Hosting Security and Technology 1 08-12-2005 12:25 AM
access mysql variables in php Antartican Programming Discussion 4 01-05-2005 05:24 AM
php, MySQL, MyODBC, and MS Access BooBoo Dedicated Server 0 08-06-2002 04:42 PM

Related posts from TheWhir.com
Title Type Date Posted
Softaculous Launches AMPPS Installer Version 1.5 Web Hosting News 2012-01-26 16:52:40
Web Host Rackspace Launches Private Beta for MySQL Cloud Database Web Hosting News 2011-12-01 21:09:51
Web Host SoftLayer Offers Microsoft WebMatrix to Windows Server Customers Web Hosting News 2011-09-09 14:17:10
Web Host A2 Hosting Launches QuickInstaller Tool for VPS Plans Web Hosting News 2011-08-19 20:00:53
Web Host FireHost Partners with Cloud Security Firm Gazzang for Data Encryption Web Hosting News 2011-08-16 20:33:43


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes
Postbit Selector

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

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

Forum Jump
Login:
Log in with your username and password
Username:
Password:



Forgot Password?
Advertisement:
Web Hosting News:



 

X

Welcome to WebHostingTalk.com

Create your username to jump into the discussion!

WebHostingTalk.com is the largest, most influentual web hosting community on the Internet. Join us by filling in the form below.


(4 digit year)

Already a member?