在PHP中使用Access数据库 [英] Using access database in php

查看:71
本文介绍了在PHP中使用Access数据库的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在VB.NET上建立了一个股票经理,它使用MS Access数据库.我还建立了一个网站,并希望在该网站上将更新的MS Access数据库文件上传到该网站,然后将其插入到mySql数据库中.现在我的问题是我不知道如何使用php访问MS Access文件,我确定没有购买这些软件的方法,但是我找不到它.现在,我不再局限于这种情况,如果有人有更好的主意,我将不胜感激,最重要的是,我希望库存管理脱机,并且在一天结束时,我希望它上载到网站. 非常感谢

I built a stock manager on VB.NET, it uses a MS Access Database. I also built a website, and on this website I want to relularly upload the updated MS Access database file onto the website and insert it into the mySql Database. Now my problem is I dont know how to access the MS Access file using php, im sure theres a way without buying those softwares, but i cant find it. Now I not bound to this scenario, if someone has better ideas i would appreciate it, most importantly I want the stock management to be offline, and at the end of the day, i want it uploaded to the site. Thanks alot

推荐答案

我过去使用ADODB和JET做到了:

I have done that in the past using ADODB and JET:

// connect
$conn = new COM('ADODB.Connection');
$conn->Open("Provider=Microsoft.Jet.OLEDB.4.0;Data Source={$database};Mode=ReadWrite;");

//query
$results = $conn->Execute($sql);

// retrieve
$results->Fields[$field]->Value;

// navigation
$results->MoveNext();
$results->Move($count);
$results->EOF();

// Close (don't forget)
$conn->Close();

这只是一个小样本. 更多帮助

This is just a small sample. More Help

这篇关于在PHP中使用Access数据库的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆