Talent87 Posted September 18, 2009 Share Posted September 18, 2009 HI, to all I have a problem in connecting the MS_access db with php using odbc , I don't understand the steps that have been written on http://www.w3schools.com/PHP/php_db_odbc.asp , the steps that I don't understand are step 6 -7- 8 , i used the code exactly that connects odbc with access northwind db , this error will occure when i browse my page on localhost Warning: odbc_connect() [function.odbc-connect]: SQL error: [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified, SQL state IM002 in SQLConnect in C:\wamp\www\odbc2.php on line 2Warning: odbc_exec() expects parameter 1 to be resource, boolean given in C:\wamp\www\odbc2.php on line 4the code I have used was this chunk below:<?php$conn=odbc_connect('northwind','','');$sql="SELECT * FROM customers";$rs=odbc_exec($conn,$sql);?>plz help Link to comment Share on other sites More sharing options...
justsomeguy Posted September 18, 2009 Share Posted September 18, 2009 That code says you're trying to use a DSN called northwind, and the error says that you haven't created a DSN with that name. Step 6 in the instructions means you need to point it to the MDB file. Step 7 is where you say what DSN you want to use, so call it northwind if that's what your code is trying to connect to. Link to comment Share on other sites More sharing options...
Talent87 Posted September 18, 2009 Author Share Posted September 18, 2009 thanks Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.