Solved

how should i connect mdb database with php on iis server?

Posted on 2009-05-04
2
826 Views
Last Modified: 2012-06-27
how should i connect mdb database with php on iis server? please give me a simple demo.
0
Comment
Question by:designersx
2 Comments
 
LVL 19

Expert Comment

by:v2Media
ID: 24296876
Set a user/pass on the mdb file.
Upload your mdb file to a folder above your website's root folder so it's inaccessible from the web.
Ensure IUSR_machinename has read/write permissions to the folder/file.
Create a system dsn on iis. If you don't have access to iisadmin, ask your webhost to create a dsn for you.
Connect and interact with the mdb using PHP's odbc functions (http://php.net/manual/en/ref.uodbc.php).
0
 
LVL 14

Accepted Solution

by:
shobinsun earned 125 total points
ID: 24301490
Hi,

for example:

$conn = new COM("ADODB.Connection") or die("Cannot start ADO");

// Microsoft Access connection string.
$conn->Open("Provider=Microsoft,.Jet.OLEDB.4.0; Data
Source=C:\\Xitami\\webpages\\sigorta.mdb");

// SQL statement to build recordset.
$rs = $conn->Execute("SELECT ad FROM baydar");

0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Foreword (July, 2015) Since I first wrote this article, years ago, a great many more people have begun using the internet.  They are coming online from every part of the globe, learning, reading, shopping and spending money at an ever-increasing ra…
In a multiple monitor setup, if you don't want to use AutoCenter to position your popup forms, you have a problem: where will they appear?  Sometimes you may have an additional problem: where the devil did they go?  If you last had a popup form open…
Basics of query design. Shows you how to construct a simple query by adding tables, perform joins, defining output columns, perform sorting, and apply criteria.
In Microsoft Access, learn how to use Dlookup and other domain aggregate functions and one method of specifying a string value within a string. Specify the first argument, which is the expression to be returned: Specify the second argument, which …

747 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now