RE: [PHP-WIN] Re: ODBC Connection
| From: | Nichols, Mark A. | Date: | Tue, 19 Nov 2002 16:47:44 +0000 |
| Subject: | RE: [PHP-WIN] Re: ODBC Connection | ||
| Groups: | php.windows | ||
| Request: | Send a blank email to php-windows+get-17041@lists.php.net to get a copy of this message | ||
Yeh, it works from a linked text file, so file permissions sounds like a good bet.
-----Original Message-----
From: Matt Kynaston [mailto:Matt.Kynaston@etbroker.com]
Sent: Tuesday, November 19, 2002 11:34 AM
To: php-windows@lists.php.net
Subject: RE: [PHP-WIN] Re: ODBC Connection
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:markn@spicergroup.com]
> Sent: 19 November 2002 16:19
> To: php-windows@lists.php.net
> 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:brian.mcgarvie@anypurposeloans.co.uk]
> 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" <markn@spicergroup.com>
> Newsgroups: php.windows
> To: <php-windows@lists.php.net>
> 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:brian.mcgarvie@anypurposeloans.co.uk]
> Sent: Tuesday, November 19, 2002 10:58 AM
> To: php-windows@lists.php.net
> Subject: [PHP-WIN] Re: ODBC Connection
>
>
> I assume on the server you have added a System DNS to the
> ODBC Manager?
>
> "Mark A. Nichols" <markn@spicergroup.com> wrote in message
> news:7A08E8036BBBAA4FBD9071B169EDC9B6A492@mailserver01.spicerg
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