473,651 Members | 2,716 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\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
Aug 4 '10 #1
1 2368
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
49543
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' (Using password: YES) in /ece/under/group14/public_html/insert.php on line 7 Unable to Select database I have no idea what the cause is, any help would be appreciated. Thanks in advance.
22
1625
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
1675
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 Library=DBMSSOCN;server=ServerName;database=DatabaseName;Trusted_Connection=true Also in the web.config file I set <authentication mode="Windows" /> and <identity impersonate="true" />
3
2018
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: connect ... plz help me
0
1066
by: nikhil27883 | last post by:
Plz can anybody help me .I want to connect access to turbo c++
0
1963
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 child of main form not working. Main form stil working but when try to open child a message show as Please select a valid SQL statement as "Select", "Delet" or "Updat" I am working with Access . I connect database in...
0
893
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 TestApplication.UI.View.UserControl (with the code behind classes UserControl1 and UserControl2*and i have a aspx page with the name space TestApplication.UI.View. From the aspx page i am able to access both the user controls by typing...
2
1860
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
3135
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 simple script to connect to the database (as I am trying to locate the source of the errors), as per below: <?php $dbhost = "localhost"; $dbuser = "debscrof_test1"; $dbpass = "test2"; $conn = mysql_connect($dbhost, $dbuser, $dbpass) or...
2
3258
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 website on linux server, there i uploaded php script to the server, in that script i am trying to connect to the mysql, but i am getting above said problem i.e access denied for this user. I given all privileges to 'pds' user like "SELECT, INSERT...
0
8275
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
1
8465
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
7297
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6158
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5612
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 then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4144
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 last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4283
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
1909
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1587
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 can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.