home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
c't freeware shareware 1997
/
CT_SW_97.ISO
/
pc
/
software
/
entwickl
/
win95
/
pw32i306.exe
/
eg
/
Ado.pl
< prev
next >
Wrap
Text File
|
1997-04-09
|
558b
|
31 lines
# Here is a sample that shows how to use ADO
#
# This assumes that the AdventureWorks sample
# that comes with IIS has been installed
#
use OLE;
$Conn = CreateObject OLE "ADODB.Connection";
$Conn->Open("ADOSamples");
$RS = $Conn->Execute("SELECT * FROM Orders");
$Count = $RS->Fields->count;
for($i = 0; $i < $Count; ++$i) {
print $RS->Fields($i)->name , "\n";
}
while(! $RS->EOF) {
for ( $i = 0; $i < $Count; $i++ ) {
print $RS->Fields($i)->value, " ";
}
print "\n";
$RS->MoveNext;
}
$RS->Close;
$Conn->Close;