I might be wrong, but I seem to remember there are some issues with linked tables in 
Access. Can you access the data in the linked tables from other applications, such as 
Excel?

Matt

> -----Original Message-----
> From: Nichols, Mark A. [mailto:[EMAIL PROTECTED]]
> Sent: 19 November 2002 16:19
> To: [EMAIL PROTECTED]
> Subject: [PHP-WIN] Re: ODBC Connection
> 
> 
> Nope, there's no .ldb file.  The file will always be closed, 
> with the exception of the PHP code.
> 
> -----Original Message-----
> From: Brian McGarvie [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, November 19, 2002 11:10 AM
> To: Nichols, Mark A.
> Subject: Re: [PHP-WIN] Re: ODBC Connection
> 
> 
> ahh... it might be an access locking issue...
> 
> ensure there is no .ldb file and try that... if it works that way then
> you'll need to keep a concurrent copy for use by the web-application.
> 
> ----- Original Message -----
> From: "Mark A. Nichols" <[EMAIL PROTECTED]>
> Newsgroups: php.windows
> To: <[EMAIL PROTECTED]>
> Sent: Tuesday, November 19, 2002 3:56 PM
> Subject: RE: [PHP-WIN] Re: ODBC Connection
> 
> 
> Yes....and as long as the table is not linked, it works fine.
> 
> 
> -----Original Message-----
> From: Brian McGarvie [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, November 19, 2002 10:58 AM
> To: [EMAIL PROTECTED]
> Subject: [PHP-WIN] Re: ODBC Connection
> 
> 
> I assume on the server you have added a System DNS to the 
> ODBC Manager?
> 
> "Mark A. Nichols" <[EMAIL PROTECTED]> wrote in message
> news:[EMAIL PROTECTED]
roup.com...
I'm not having much luck here.

 I've created a MS Access database that has a linked table to an Exchange
2000 public folder.  When I access this database (MS Access) with PHP, it
works fine with the table imported, but when linked to Exchange, PHP
returns:

Warning: SQL error: [Microsoft][ODBC Microsoft Access Driver] Not a valid
account name or password., SQL state 08004 in SQLExecDirect in
C:\FoxServ\www\linkdata\testme.php on line 11

Warning: odbc_fetch_row(): supplied argument is not a valid ODBC result
resource in C:\FoxServ\www\linkdata\testme.php on line 13

Here's the code, any ideas.

<?
     $user = "";
     $password = "";
     $dsn="exchlink";
     if (!($conn = @odbc_connect($dsn,$user,$password)))
     {
         echo "Could not connect to the database at this time.";
         exit();
     }
     $sql = "SELECT Company,Last,First from sgcontacts ORDER BY
Company,Last,First";
     $result = odbc_exec($conn,$sql);

     while (odbc_fetch_row($result))
     {
         $company = odbc_result($result,"Company");
         $last = odbc_result($result,"Last");
         $first = odbc_result($result,"First");
         echo $company . " " . $last . " " . $first . "<br>";
     }
?>



--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



-- 
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to