Главная страница


ru.perl

 
 - RU.PERL ----------------------------------------------------------------------
 From : Valery                               2:5020/400     08 Feb 2001  12:31:47
 To : All
 Subject : DBD-Freetds-0.02
 -------------------------------------------------------------------------------- 
 
 
 ????: DBD-Freetds-0.02, MSSQL6.5 sp5
 
 ??? ????????, ?? ???? ???? ?????? ??? -
 ?? ???? ???????? ????????? ?? ???????? ?????????.
 ?.?. ??? ???????????, ??????????? ??? ????????,
 ?? ???? ??? ?????? ????-?? ??????? (???? SELECT),
 ?? ? ?? ???? ???? ???????. FETCH ??????? ??? ?????? ???.
 
 ----------------------------------------------
 #!/usr/bin/perl
 use DBI;
 
 $dsn = "DBI:FreeTDS:database=DATABASE;host=HOST;port=1433;";
 $dbh = DBI->connect($dsn, "USER", "PASSW");
 $sql = "EXECUTE my_stored_proc";
 $sth = $dbh->prepare($sql) || die $dbh->errstr;
 
 $sth->trace(2);
 $sth->execute || die $dbh->errstr;
 
 undef @data1; undef @data2;
 $i = 0;
 
 do {
   while((@data1[$i], @data2[$i],) = $sth->fetchrow)
   {
       $i = $i + 1;
       print "@data1[$i] @data2[$i] \n";
   }
 } while ($sth->{more_results});
 
 $sth->finish;
 $dbh->disconnect;
 
 ----------------------------------------------
 ???????????:
 ----------------------------------------------
     DBI::st=HASH(0x815a1b8) trace level set to 2 in DBI 1.13-nothread
     Note: perl is running without the recommended perl -w option
 
     -> execute for DBD::FreeTDS::st (DBI::st=HASH(0x81b9290)~0x815a1b8)
 
     <- execute= 1 at sp.cgi line 21.
 
     -> fetchrow for DBD::FreeTDS::st (DBI::st=HASH(0x81b9290)~0x815a1b8)
 
     <- fetchrow= ( ) [0 items] at sp.cgi line 46.
 
     -> FETCH for DBD::FreeTDS::st (DBI::st=HASH(0x815a1b8)~INNER 'more_results')
 
     <- FETCH= 1 at sp.cgi line 45.
 
     -> fetchrow for DBD::FreeTDS::st (DBI::st=HASH(0x81b9290)~0x815a1b8)
 
     <- fetchrow= ( undef undef undef undef ) [4 items] at sp.cgi line 46.
     ---1
 
     -> fetchrow for DBD::FreeTDS::st (DBI::st=HASH(0x81b9290)~0x815a1b8)
 
 tdslayer.c:2294: Unhandled subpacket type 0x01
 Aborted
 ----------------------------------------------
 ????? ????? ??????.
 ? ?????????, ???????.       bvf@oasutp.stal.ru
 
 P.S. ? ??? do {} while($sth->{more_results}) ??? ??????????.
 Sent via NewsGate http://www.newsgate.ru/
 --- ifmail v.2.15dev5
  * Origin: Telemost Co. (2:5020/400)
 
 

Вернуться к списку тем, сортированных по: возрастание даты  уменьшение даты  тема  автор 

 Тема:    Автор:    Дата:  
 DBD-Freetds-0.02   Valery   08 Feb 2001 12:31:47 
Архивное /ru.perl/9346343399de.html, оценка 3 из 5, голосов 10
Яндекс.Метрика
Valid HTML 4.01 Transitional