Solved

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

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

U.S. Department of Agriculture and Acronis Access

With the new era of mobile computing, smartphones and tablets, wireless communications and cloud services, the USDA sought to take advantage of a mobilized workforce and the blurring lines between personal and corporate computing resources.

Question has a verified solution.

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

I see at least one EE question a week that pertains to using temporary tables in MS Access.  But surprisingly, I was unable to find a single article devoted solely to this topic. I don’t intend to describe all of the uses of temporary tables in t…
A simple tool to export all objects of two Access files as text and compare it with Meld, a free diff tool.
The viewer will learn how to count occurrences of each item in an array.
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

830 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