in reply to Read MS Access Memos with Win32::OLE ADODB
use OLE; # use Win32::OLE if using the Std Distribution $Conn = CreateObject OLE "ADODB.Connection"; $Conn->Open("DSN=MyDSN;UID=MyUID;PWD=MyPwd") or die "Cannot connect"; $RS = $Conn->Execute("SELECT * FROM Pubs"); if(!$RS) { $Errors = $Conn->Errors(); print "Errors:\n"; foreach $error (keys %$Errors) { print $error->{Description}, "\n"; } die; } while ( !$RS->EOF ) { my($Author, $Title, $ISBN) = ( $RS->Fields('Author')->value, $RS->Fields('Title')->value, $RS->Fields('ISBN')->value ); print $Author, " : ", $Title, " : ", $ISBN, "\n"; $RS->MoveNext; } $RS->Close; $Conn->Close
|
|---|