|
Posted by chris on 09/26/05 14:42
Hi,
I try to connect to Access with php with te code below. The database and
table are ok.
<?php
include('../adodb/adodb.inc.php');
$db =& ADONewConnection('access');
$dsn = "Driver={Microsoft Access Driver
(*.mdb)};Dbq=newres.mdb;Uid=Admin;Pwd=;";
$db->Connect($dsn);
.....
I get the error:
Warning: odbc_connect() [function.odbc-connect]: SQL error: [Microsoft][ODBC
Microsoft Access Driver]General error Unable to open registry key 'Temporary
(volatile) Jet DSN for process 0x840 Thread 0x860 DBC 0xb48c3c Jet'., SQL
state S1000 in SQLConnect in
D:\Inetpub\wwwroot\resphp\adodb\drivers\adodb-odbc.inc.php on line 60
[Microsoft][ODBC Microsoft Access Driver]General error Unable to open
registry key 'Temporary (volatile) Jet DSN for process 0x840 Thread 0x860
DBC 0xb48c3c Jet'.
When using a DSN connection, it works:
<?php
include('../adodb/adodb.inc.php');
$conn = &ADONewConnection('access'); # crιe une connexion
$conn->PConnect('phpaccess'); # se connecte ΰ MS-Access
When using OLEDB:
<?php
include('../adodb/adodb.inc.php');
$db =& ADONewConnection('access');
$dsn= "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=newres.mdb;User
Id=admin;Password=;";
$db->Connect($dsn);
I get this error:
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
D:\Inetpub\wwwroot\resphp\adodb\drivers\adodb-odbc.inc.php on line 60
[Microsoft][ODBC Driver Manager] Data source name not found and no default
driver specified
Any help would be welcome.
Kevin
Navigation:
[Reply to this message]
|