Solved

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

Posted on 2009-05-04
2
831 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

Use Case: Protecting a Hybrid Cloud Infrastructure

Microsoft Azure is rapidly becoming the norm in dynamic IT environments. This document describes the challenges that organizations face when protecting data in a hybrid cloud IT environment and presents a use case to demonstrate how Acronis Backup protects all data.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Part of the Global Positioning System A geocode (https://developers.google.com/maps/documentation/geocoding/) is the major subset of a GPS coordinate (http://en.wikipedia.org/wiki/Global_Positioning_System), the other parts being the altitude and t…
Password hashing is better than message digests or encryption, and you should be using it instead of message digests or encryption.  Find out why and how in this article, which supplements the original article on PHP Client Registration, Login, Logo…
In Microsoft Access, learn different ways of passing a string value within a string argument. Also learn what a “Type Mis-match” error is about.
In Microsoft Access, learn the trick to repeating sub-report headings at the top of each page. The problem with sub-reports and headings: Add a dummy group to the sub report using the expression =1: Set the “Repeat Section” property of the dummy…

831 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