首页 > 数据库 > Access > 正文

如何将mysql数据导入access数据库

2024-09-07 19:03:55
字体:
来源:转载
供稿:网友

mysql数据库表sqltable
字段id,name,sex,email

access数据库表accesstable
id,name,sex,email

<?
$connect = mysql_connect("localhost","","");
mysql_select_db("mydatabase");
$sql = "select * from sqltable;
$result = mysql_query($sql};
$connectodbc=odbc_connect("DSN","USERNAME","PASSWORD");
while($row = mysql_fetch_row($result))
{
$sql="insert into accesstable

values($row["id",$row["name",$row["sex"],$row["email"])";
odbc_do($connectodbc,$sql);
}
odbc_close($connectodbc);
mysql_close($conect);
?>

发表评论 共有条评论
用户名: 密码:
验证码: 匿名发表