Reply to PHP and Access Connection

Your name:

Reply:


Posted by Karl Irvin on 01/09/06 23:16

The following piece of script runs OK on my local computer but returns an
error when run on the web e.g. it's the connection process on my web that
isn't working. ISP is on Windows servers and has Access and PHP. My users
forum software (written by megga bbs in ASP) uses Access and runs OK on my
web.
------------------------------------------
<?php

$conn = new COM("ADODB.Connection")or exit('Cannot start ADO.');

//$db = "C:\\Access2003\\PHPSample.mdb"; // local path

$db = "g:\html\hostedomains\xxxx\db\PHPSample.mdb"; // web path

// domain changed to xxxx in this NG posting for security

$conn->Open("Provider=Microsoft.Jet.OLEDB.4.0; Data Source=$db");

$sql = "SELECT * FROM tProducts WHERE ProductName='Widget'";

$rs= $conn->Execute($sql);

//loops and displays data

while(!$rs->EOF)
{
$Product = $rs->Fields('ProductName');
$Price = $rs->Fields('UnitPrice');

echo "product: $Product<br>";
echo "price: " . $Price . "<br>";

$rs->MoveNext();
}

$conn->Close();
------------------------------------------
The error is:

The specified CGI application misbehaved by not returning a complete
set of HTTP headers.
------------------------------------------
Can anyone see what I need to change?


--

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация