Ia m aun able to connect the MS access through Wamps5 1.7.3
Here is the code
Error message is as follows
Kindly help me to solve this issue
I am awaiting for your valuable suggestion please
With regards
Ashok Parhi
Here is the code
Code:
<?php
// Two versions of Microsoft Office. Choose one.
//$db = 'C:\EmployeeDetails.mdb';
$db = 'C:\wamp\www\empdetails\EmployeeDetails.mdb';
$conn = new COM('ADODB.Connection') or exit('Cannot start ADO.');
// Two ways to connect. Choose one.
//$conn->Open("dns=Microsoft.Jet.OLEDB.4.0; Data Source=$db") or exit('Cannot open with Jet.');
$conn->Open("vt={Microsoft Access Driver (*.mdb)}; DBQ=$db") or exit('Cannot open with driver.');
$sql = 'SELECT * FROM Emp_Details order by gradepaydummy DESC';
$rs = $conn->Execute($sql);
?>
<table>
<tr>
<th>Srno</th>
<th>Employee Name</th>
<th>Father Name</th>
<th>Designation</th>
<th>Pay Band</th>
<th>Grade Pay</th>
<th>Date of Birth</th>
<th>Date of Joining</th>
<th>Date of Retirement</th>
<th>Deputation/Direct</th>
</tr>
<?php while (!$rs->EOF) ?>
Fatal error: Uncaught exception 'com_exception' with message '<b>Source:</b> Microsoft OLE DB Provider for ODBC Drivers<br/><b>Description :</b> [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified' in C:\wamp\www\emp details\empd.ph p:10 Stack trace: #0 C:\wamp\www\emp details\empd.ph p(10): com->Open('vt={Micr osoft A...') #1 {main} thrown in C:\wamp\www\emp details\empd.ph p on line 10
Kindly help me to solve this issue
I am awaiting for your valuable suggestion please
With regards
Ashok Parhi
Comment