Register

If this is your first visit, please click the Sign Up now button to begin the process of creating your account so you can begin posting on our forums! The Sign Up process will only take up about a minute of two of your time.

Results 1 to 4 of 4
  1. #1
    Member Anant's Avatar
    Join Date
    Feb 2005
    Location
    Indore , India
    Posts
    50
    Member #
    9049
    hello everyone...

    I have a problem in Mysql !!! I got a database with data in it ...but this database is in Access ...now i want to transfer this all database with data in Mysql !!!

    Is there any query for it or commnad ...or can technique ...??? its very urgent ..pls help me out

    Anant

  2.  

  3. #2
    Junior Member
    Join Date
    Feb 2005
    Posts
    5
    Member #
    9143
    I used a small program called AccessDump (accessdump.com) and it creates an file/code upon export from Access you can use to dump the data into MySQL. VERY simple. Check out their site and you will see what I mean. I do not know of any other way to export, AND write the MySQL code at the same time.

  4. #3
    Member Anant's Avatar
    Join Date
    Feb 2005
    Location
    Indore , India
    Posts
    50
    Member #
    9049
    Quote Originally Posted by window2
    I used a small program called AccessDump (accessdump.com) and it creates an file/code upon export from Access you can use to dump the data into MySQL. VERY simple. Check out their site and you will see what I mean. I do not know of any other way to export, AND write the MySQL code at the same time.
    but i need soemthing thats free ...i am just a student ...can't afford so much !!!
    pls tell me some other way

  5. #4
    Senior Member rosland's Avatar
    Join Date
    Jul 2003
    Location
    Norway
    Posts
    1,944
    Member #
    2096
    PHP supports ODBC, which means you can connect to and extract info from a host of DataBases (including Access).

    If you extract all columns/data from your Access DB, send it to screen, copy/paste the result to a textfile, you can easily load that textfile into your MySQL DB through a "LOAD DATA INFILE 'data.txt'".

    Check out the ODBC example listed on here.
    Look for the 'f dot chehimi at lancaster...' post under user notes.

    I tried his example, and it works perfectly.

    A slightly modified code to make it print to screen:
    PHP Code:
    $con odbc_connect('AccessDriver','','');  

    if (
    $con)
    {
      
    $sql =  "select * from tbl_name"

      
    //this function will execute the sql statement in  
      //correspondance to the table in the db
      
    $res odbc_exec($con,$sql);
      
    $num_fields=odbc_num_fields ($res);
    }
    else
      echo 
    "<b>ODBC not connected!</b><br>---<br>";
     
    if(
    $res)
    {
      echo 
    "<b>Selection completed!<br>---<br>Here are the results:</b><p>";
      
      for(
    $i=1$i<($num_fields+1); $i++)
         {
              
    $col[]=odbc_field_name ($res$i);
            print 
    "<b>".$col[($i-1)]." | </b>";
        }
      print 
    "<br>";
      
      while(
    $row=odbc_fetch_object($res) )
           if(
    $row)
               {
                   for(
    $i=0$i<$num_fields$i++)
                {
                    print 
    $row->$col[$i]." | ";
                }
                print 
    "<br>";
            }
    }
    else
      echo 
    "selection failed<br>";

    odbc_close($con); 
    S. Rosland


Remove Ads

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
All times are GMT -6. The time now is 12:07 AM.
Powered by vBulletin® Version 4.2.3
Copyright © 2019 vBulletin Solutions, Inc. All rights reserved.
vBulletin Skin By: PurevB.com