首 页中国梦想方达科技Loveshine'Blog绿区文章绿区下载绿区图像客户留言绿区论坛繁體中文
设为首页
加入收藏
联系我们
您当前的位置:绿色生活社区 -> 数 据 库 -> Mysql -> 文章内容 退出登录 用户管理
栏目导航
· Access · Mysql
· Mssql · Oracle
热门文章
· [组图] 网页导航条素..
· QQ空间相册密码破解..
· 【推荐收藏】【MSDN..
· WIN2003产品密钥
· 越狱全集高速下载
· 新东方在线 4+1 网络..
· 空间代码----最新去..
· 用于格式化后硬盘数..
· 新东方在线 4+1 网络..
· 新东方在线 4+1 网络..
相关文章
· Turbo C 函数中文说..
Tutorial for migrating data from MS Access to MySQL
作者:不详  来源:网络  发布时间:2008-1-20 14:59:16  发布人:loveshine

减小字体 增大字体

One of the main reasons I started FreeSQL.org is to open up newbie users to the wide world of enterprise-level database access. One of the most common questions I'm asked is "how do I upload my data from my Access database to my MySQL database?" This is far easier than you think and is done using an often overlooked feature of Microsoft Access. Namely, the ability to import, export, and link to non-Access data sources. For now lets just consider MySQL.
The first step is to provide the capability for your windows system to communicate with the remote MySQL server. This is done using MyODBC. If you don't have it installed already, get it from mysql.com/downloads/api-myodbc.html" target=_blank>here.
Recently I had to move a database of zipcodes to my MySQL server. I will list the steps I took to migrate this data.
  1. In the windows 98 control panel (or equivalent in WinME, Windows 2000, or XP) open the ODBC Data Source Administrator. You will want to create a new System data source.

  2. Choose "Add", then select the MySQL driver. You should see the following form. Give it a meaningful DSN name, in my case I called it remoteZipCodes. The DSN is how you will identify this connection when you want to use it from another application. Fill in the rest of the necessary information correctly. One tip, MySQL is case sensistive. Make sure you get the username, password, and database case correct.

  3. Here is my source data. A single Access table containing zipcodes by city and state, along with their latitude and longitude.

  4. We want to "export" our data to the remote MySQL server. Select the table you want to export and choose "file/save as/export…" from the main Access menu, then choose "to an external file or database".
  5. The "save table" dialog box will then open and by default will try to export your table to another Access MDB. You change the format of the destination by choosing from the "save as type" combo box. In our case we want to select "ODBC Databases ()". It is probably at the very bottom of the list.

    Next, this little window will open

    to allow you to change the name of the table that will be created in the remote database.
  6. When you select "OK" you should then see your list of ODBC data sources. Select the DSN you created in step 2.
  7. Once you select the data source, the export begins immediately. Be patient, it may take a while, but it does work!

Try experimenting with importing and especially linking too! You will find that you can read and actually query data from Oracle, PostgreSQL (my other favorite database), Excel spreadsheets, and even text files. To link a table into an Access MDB, on the Table tab select "new" then "link"....I think you'll figure out the rest!

[] [返回上一页] [打 印] [收 藏]
∷相关文章评论∷    (评论内容只代表网友观点,与本站立场无关!) [更多评论…]
关于本站 - 网站帮助 - 广告合作 - 下载声明 - 友情连接 - 网站地图 - 绿区社区
Copyright © 2002-2006 1Lives.Com. All Rights Reserved .
冀ICP备06009849号