Perl/C#????Oracle/SQL Server
???????????? ???????[ 2013/10/24 10:15:05 ] ????????
????????????????????????????????????????????????????
????1. Perl ?????????
????Perl ???????????·?????
????1?????DBI??飻 2?????????????????dbh?? 3??????dbh?????????sth?? 4??????sth???sql??? 5??????sth?????????
??????????Oracle??
my $dbh=DBI->connect("DBI:Oracle:host=$hostname;sid=$sid"??$username??$passwd);
### deal with multi return value
my $sql=qq(select uid_der from wbphish_usr_der);
$sth->execute();
my $sth=$dbh->prepare($sql);
$sth->execute() or die;
my @uid;
while(my @row=$sth->fetchrow_array)
{ push @uid??$row[0];}
### deal with single return value
my $sql="SELECT max(DEMO) FROM phishing"
$sth->execute();
my $sth=$dbh->prepare($sql);
$sth->execute() or die;
my $id=$dbh->selectrow_array($sql);
????????host???????server??ip?????sid???????????
??????????SQL Server??
my $dbh = DBI->connect("dbi:ODBC:driver={SQL Server};Server=127.0.0.1;Database=$dbs;UID=$uid;PWD=$pwd");
my $sth = $dbh->prepare($sql);
$sth->execute();
????????Server??server??ip???????????local?????Database???????????
??????
![](/images/ad-banner/ad-banner.png)
???·???
??????????????????
2023/3/23 14:23:39???д?ò??????????
2023/3/22 16:17:39????????????????????Щ??
2022/6/14 16:14:27??????????????????????????
2021/10/18 15:37:44???????????????
2021/9/17 15:19:29???·???????·
2021/9/14 15:42:25?????????????
2021/5/28 17:25:47??????APP??????????
2021/5/8 17:01:11