home *** CD-ROM | disk | FTP | other *** search
/ Chip 2000 May / Chip_2000-05_cd1.bin / zkuste / Perl / ActivePerl-5.6.0.613.msi / 䆊䌷䈹䈙䏵-䞅䞆䞀㡆䞃䄦䠥 / _5c882b0d1ddf37fa471ff7c007cace1f < prev    next >
Text File  |  2000-03-15  |  560b  |  26 lines

  1. <Job ID="Test">
  2. <script language=PerlScript runat=server>
  3.     $conn=$WScript->CreateObject('ADODB.Connection', 'MyWSH_');
  4.     $conn->Open(<<EOF);
  5.     Provider=SQLOLEDB;
  6.     User ID=sa;
  7.     Catalog=Northwind;
  8. EOF
  9.  
  10.     if($conn->{State} == 1) {
  11.     $WScript->Echo("Connection Successful!")
  12.     }
  13.     else {
  14.     $WScript->Echo("Connection Failed ...");
  15.     }
  16.  
  17.  
  18. sub MyWSH_ConnectComplete {
  19.     $WScript->Echo("ConnectComplete was fired ... ");
  20. }
  21.  
  22. sub MyWSH_WillConnect {
  23.     $WScript->Echo("WillConnect was fired ... ");
  24. }
  25. </script>
  26. </Job>