Home php教程 php手册 好了,我经过大家的支持现在已经成功的把access数据倒换为mysql形式,本人将奉献给那些需要的朋

好了,我经过大家的支持现在已经成功的把access数据倒换为mysql形式,本人将奉献给那些需要的朋

Jun 13, 2016 am 10:02 AM
access mysql for Will success I Bundle support data Now of

第一步、做好数据库的准备。安装数据源(这个就费了我好几天了),首先点击控制面板中的
odbc数据源(32位)
,点击进入后选择
用户DSN(其实是默认的)
,在其中选择
MS ACCESS 97 DATABASE 这一选项,点击其右面的配置按钮。
会出来一个窗口名字是:[Odbc microsoft 安装]。
在其中间部分选择你所要调用的数据库。(选择选取按钮)
再在点击其右侧的高级选项,会弹出一个[高级设置选项]在其中设置用户密码和用户名(每个名称记好了),在栏目下方的选项类型中点击
defaultdir,在最下方的数值中输入你的数据库(也就是access 数据库)。然后一个个确定回到初始位置(用户DSN),这时候开始[添加]你刚才所加的数据源,选择*.mdb(就是access),点击完成。进入到另一个页,在开头数据源中:数据你的数据库源名:(比如我以前使用的是taici.mdb,那么现在在其中输入taici就可以了)。然后肯定要选择你要所找的数据库了。好了,现在数据库可以告一段落了。
第二步,那就是程序倒换的问题了。

$cnx = odbc_connect('taici', 'Admin', 'WSD');
记得吗?教你输入用户跟密码时候叫你记好的,就是Admin 和WSD,知道怎么做了?!
$cur= odbc_exec( $cnx, 'select *    from word' );
其中的word就是其中的一个表taici
$num_row=0;
$conn=mysql_pconnect("localhost","wsd","wsd");// 连接mysql
@mysql_select_db('sms',$conn) or
die("无法连接到数据库,请与管理员联系!");//打开mysql的mydb数据库
while( odbc_fetch_row( $cur ))       //从sql server的mydb库中的user表逐条取出数据,如果对数据进行选择,可在前面的select语句中加上条件判断
{
    $num_row++;
    $field1 = odbc_result( $cur, 1 );     // 这里的参数i(1,2,3..)指的是记录集中的第i个域,你可以有所选择地进行选取,fieldi得到对应域的值,然后你可以对fieldi进行操作
    $field2 = odbc_result( $cur, 2 );     
    $field3 = odbc_result( $cur, 3 );     
    $field4 = odbc_result( $cur, 4 );     

Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

Video Face Swap

Video Face Swap

Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Tools

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

Centos install mysql Centos install mysql Apr 14, 2025 pm 08:09 PM

Installing MySQL on CentOS involves the following steps: Adding the appropriate MySQL yum source. Execute the yum install mysql-server command to install the MySQL server. Use the mysql_secure_installation command to make security settings, such as setting the root user password. Customize the MySQL configuration file as needed. Tune MySQL parameters and optimize databases for performance.

How to start mysql by docker How to start mysql by docker Apr 15, 2025 pm 12:09 PM

The process of starting MySQL in Docker consists of the following steps: Pull the MySQL image to create and start the container, set the root user password, and map the port verification connection Create the database and the user grants all permissions to the database

How to install mysql in centos7 How to install mysql in centos7 Apr 14, 2025 pm 08:30 PM

The key to installing MySQL elegantly is to add the official MySQL repository. The specific steps are as follows: Download the MySQL official GPG key to prevent phishing attacks. Add MySQL repository file: rpm -Uvh https://dev.mysql.com/get/mysql80-community-release-el7-3.noarch.rpm Update yum repository cache: yum update installation MySQL: yum install mysql-server startup MySQL service: systemctl start mysqld set up booting

MySQL's Role: Databases in Web Applications MySQL's Role: Databases in Web Applications Apr 17, 2025 am 12:23 AM

The main role of MySQL in web applications is to store and manage data. 1.MySQL efficiently processes user information, product catalogs, transaction records and other data. 2. Through SQL query, developers can extract information from the database to generate dynamic content. 3.MySQL works based on the client-server model to ensure acceptable query speed.

How to solve nginx403 error How to solve nginx403 error Apr 14, 2025 pm 12:54 PM

The server does not have permission to access the requested resource, resulting in a nginx 403 error. Solutions include: Check file permissions. Check the .htaccess configuration. Check nginx configuration. Configure SELinux permissions. Check the firewall rules. Troubleshoot other causes such as browser problems, server failures, or other possible errors.

MySQL vs. Other Databases: Comparing the Options MySQL vs. Other Databases: Comparing the Options Apr 15, 2025 am 12:08 AM

MySQL is suitable for web applications and content management systems and is popular for its open source, high performance and ease of use. 1) Compared with PostgreSQL, MySQL performs better in simple queries and high concurrent read operations. 2) Compared with Oracle, MySQL is more popular among small and medium-sized enterprises because of its open source and low cost. 3) Compared with Microsoft SQL Server, MySQL is more suitable for cross-platform applications. 4) Unlike MongoDB, MySQL is more suitable for structured data and transaction processing.

How to call docker lnmp How to call docker lnmp Apr 15, 2025 am 11:15 AM

Docker LNMP container call steps: Run the container: docker run -d --name lnmp-container -p 80:80 -p 443:443 lnmp-stack to get the container IP: docker inspect lnmp-container | grep IPAddress access website: http://<Container IP>/index.phpSSH access: docker exec -it lnmp-container bash access MySQL: mysql -u roo

How to configure domain name for nginx How to configure domain name for nginx Apr 14, 2025 am 11:30 AM

To configure a domain name in Nginx, follow these steps: Add a Server block and specify the domain name. Set the root directory of the website file. Set the index file in the root directory. Set the way to handle error codes. Configure server access and error logs. Reload or restart the Nginx service.

See all articles