473,503 Members | 3,171 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

I am not able to connect Access through wamps5 1.7.3

1 New Member
Ia m aun able to connect the MS access through Wamps5 1.7.3

Here is the code

Expand|Select|Wrap|Line Numbers
  1. <?php
  2. // Two versions of Microsoft Office.  Choose one.
  3. //$db = 'C:\EmployeeDetails.mdb';
  4. $db = 'C:\wamp\www\empdetails\EmployeeDetails.mdb';
  5. $conn = new COM('ADODB.Connection') or exit('Cannot start ADO.');
  6.  
  7.  
  8. // Two ways to connect. Choose one.
  9. //$conn->Open("dns=Microsoft.Jet.OLEDB.4.0; Data Source=$db") or exit('Cannot open with Jet.');
  10. $conn->Open("vt={Microsoft Access Driver (*.mdb)}; DBQ=$db") or exit('Cannot open with driver.');
  11. $sql = 'SELECT * FROM Emp_Details order by gradepaydummy DESC';
  12. $rs = $conn->Execute($sql);
  13. ?>
  14. <table>
  15. <tr>
  16.  <th>Srno</th>
  17.      <th>Employee Name</th>
  18.      <th>Father Name</th>
  19.      <th>Designation</th>
  20.      <th>Pay Band</th>
  21.      <th>Grade Pay</th>
  22.      <th>Date of Birth</th>
  23.      <th>Date of Joining</th>
  24.      <th>Date of Retirement</th>
  25.      <th>Deputation/Direct</th>
  26.  
  27. </tr>
  28. <?php while (!$rs->EOF)  ?>
Error message is as follows


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\empdetails\empd.php:10 Stack trace: #0 C:\wamp\www\empdetails\empd.php(10): com->Open('vt={Microsoft A...') #1 {main} thrown in C:\wamp\www\empdetails\empd.php on line 10

Kindly help me to solve this issue

I am awaiting for your valuable suggestion please

With regards
Ashok Parhi
Aug 4 '10 #1
1 2357
johny10151981
1,059 Top Contributor
please follow the link.
link
Aug 4 '10 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

3
49524
by: photoelectric | last post by:
When trying to run the below script on an apache/1.3.26 with mysql and php I get the following error message: Warning: mysql_connect() : Access denied for user: 'nobody@software-ece.rutgers.edu'...
22
1588
by: Nivvy | last post by:
HI all, I just wondered by seeing the o/p of the program. Let me know wt is the reason. class Base { public : virtual void f1() {
3
1666
by: Ramesh | last post by:
I am trying to access a remote sql server from an ASP.Net application using ADO.Net. I want to use trusted connection and so set the connection string as Dim strConn As String = Network...
3
2012
by: arivazhaganit | last post by:
while using JEditorPane , I am able to access only file: protocal not http:// protocal , while opening http:// URL in editorpane ,it showing that java.net.ConnectException: Connection timed out:...
0
1061
by: nikhil27883 | last post by:
Plz can anybody help me .I want to connect access to turbo c++
0
1952
by: asad56 | last post by:
I am workin with a superstore managment project. I connect Access database with main form . Then it work properly. But now I connect same database with another table or field in another form which is...
0
887
by: anileshlakhtakia | last post by:
Hi, I am getting this problem and i am not able to understand what is the logic behind this.My Problem is i have 2 user controls on my application having same namespace lets say...
2
1839
9815402440
by: 9815402440 | last post by:
hi i want to connect access database which is on remote server (web server). can anybody please tell how to do this? thanx in advance. manpreet singh dhillon hoshiarpur
1
3120
by: servo | last post by:
I created a user "test1" (which then got the username "debscrof_test1" from CPanel), a password for the user "test2", and then added the user to a new database "testdb" with all priviliges Then a...
2
3252
by: sbettadpur | last post by:
hello I am getting following error while connecting to mysql through php Warning: mysql_connect() : Access denied for user: 'pds@localhost' (Using password: YES) Actually I hosted one...
0
7188
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7063
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
5558
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
4663
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3156
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3146
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1489
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
720
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
366
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.