中国站长下载-为中国站长提供最好最全的建站资源! 首 页发布资源有事留言繁體中文
设为首页
加入收藏
联系我们
 
您当前的位置:中国站长下载 -> 文章中心 -> 数据库区 -> ACCESS -> 文章内容  虚拟主机 域名注册 退出登录 用户管理
栏目导航
· ACCESS · MSSQL
· Mysql · DB2
· ORACLE · SYBASE
· 其他相关
热门文章
· sndvol32 - sndvol3...
· [组图] FLASH:《大话李白》...
· 个人网站到底能赚多...
· [图文] Rundll.exe是病毒吗...
· [组图] Flash:制作MV
· 价值12万元的网站SE...
· 网站创业者,你需要...
· 一个成功的网站设计...
· [图文] FLASH:韩国导航条解...
· 中国网站的赚钱模式...
相关文章
· PHP3 入门教程(极短...
· 初学入门 PHP 和 My...
· PHP4与MySQL数据库操...
· PHP4与MySQL数据库操...
· PHP4与MySQL数据库操...
· PHP4与MySQL数据库操...
· PHP4与MySQL数据库操...
· PHP4与MySQL数据库操...
· PHP/MySQL 购物车
· PHP和MySQL开发的8个...
Tutorial for migrating data from MS Access to MySQL
作者:佚名  来源:不详  发布时间:2006-5-9 16:04:53  发布人:chinazhan

 减小字体 增大字体

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 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!
   mysql
 
[] [返回上一页] [打 印] [收 藏]
下一篇文章:一个访问ACCESS的类
∷相关文章评论∷    (评论内容只代表网友观点,与本站立场无关!) [更多评论...]
中国站长下载
中国站长下载

本页只接受PR>=4 IT类站点连接,申请连接,谢谢您们的支持!希望我们的下载站能够真正帮到中国的站长们!
关于本站 - 网站帮助 - 广告合作 - 下载声明 - 友情连接 - 网站地图
Copyright © 2005-2006 ChinaZhan.Net. All Rights Reserved .