p2p.wrox.com Forums

Need to download code?

View our list of code downloads.

  Return to Index  

beginning_php thread: ADO problems

Message #1 by "Peter Kaufman" <kaufman@l...> on Sun, 14 Apr 2002 08:27:40 +0700
Hi Folks,

I need some advice on the following:

1) Using this code, the recordset is apparently not opening as the
attempt to print a field returns 'object' and, yes, the table definitely
has records. I don't know why its not working. Trusted connection should
not be a problem - it works in SQL Query Analyzer. The connection string
is also shown below.

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

$dbc = new com("ADODB.Connection");
$strsql = "select * from tblContact";
$rs = $dbc->execute("select * from tblContact");
print $rs->recordcount


2) I am working from the PHP Black Book, which has no info on connecting
to anything but ODBC, MySQL and the like - not MS SQL or ADO. Can anyone
point me to a tutorial on using ADO with PHP?

Thanks a lot,


  Return to Index