Solved

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

Posted on 2009-05-04
2
854 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

What is SQL Server and how does it work?

The purpose of this paper is to provide you background on SQL Server. It’s your self-study guide for learning fundamentals. It includes both the history of SQL and its technical basics. Concepts and definitions will form the solid foundation of your future DBA expertise.

Question has a verified solution.

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

Access developers frequently have requirements to interact with Excel (import from or output to) in their applications.  You might be able to accomplish this with the TransferSpreadsheet and OutputTo methods, but in this series of articles I will di…
Traditionally, the method to display pictures in Access forms and reports is to first download them from URLs to a folder, record the path in a table and then let the form or report pull the pictures from that folder. But why not let Windows retr…
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…
The viewer will learn how to count occurrences of each item in an array.

617 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