亚洲av成人无遮挡网站在线观看,少妇性bbb搡bbb爽爽爽,亚洲av日韩精品久久久久久,兔费看少妇性l交大片免费,无码少妇一区二区三区

  免費(fèi)注冊 查看新帖 |

Chinaunix

  平臺 論壇 博客 文庫
最近訪問板塊 發(fā)新帖
查看: 4329 | 回復(fù): 2
打印 上一主題 下一主題

DBI pass-thru mode是什么意思? [復(fù)制鏈接]

論壇徽章:
0
跳轉(zhuǎn)到指定樓層
1 [收藏(0)] [報告]
發(fā)表于 2011-08-03 15:58 |只看該作者 |倒序?yàn)g覽
The DBI itself does not mandate or require any particular language to be used; it is language independent. In ODBC terms, the DBI is in "pass-thru" mode, although individual drivers might not be. The only requirement is that queries and other statements must be expressed as a single string of characters passed as the first argument to the "prepare" or "do" methods.

RT。

In ODBC terms, the DBI is in "pass-thru" mode, although individual drivers might not be.

這句不知道在說什么?求大俠賜教。

CPAN鏈接:http://search.cpan.org/~timb/DBI/DBI.pm#SYNOPSIS

論壇徽章:
0
2 [報告]
發(fā)表于 2011-08-06 21:19 |只看該作者
[quote]The DBI itself does not mandate or require any particular language to be used; it is language indepe ...
[size=2][color=#999999]akwhole 發(fā)表于 2011-08-03 15:58[/color] [url=http://72891.cn/redirect.php?goto=findpost&pid=21287909&ptid=3576313][img]http://72891.cn/images/common/back.gif[/img][/url][/size][/quote]


    意思是說,DBI接口不依賴于具體的數(shù)據(jù)庫類型,它下面有DBD::Oracle, DBD::Mysql來處理這些數(shù)據(jù)庫的差異。

對于DBI來說,它只管把接收到的SQL語句作為一個字符變量,來執(zhí)行prepare和do操作。
my $dsn = "dbi:Oracle:$tns";
my $dbh = DBI->connect( $dsn, $user, $passwd, {RaiseError => 0} );
    my $sql = "SELECT version FROM product_component_version WHERE product LIKE '%Oracle%' ";
    my $sth = $dbh->prepare( $sql );
    $sth->execute( );

數(shù)據(jù)庫的差異由創(chuàng)建$dbh時,由$dsn指定,到了后面的$sth,就只管執(zhí)行SQL。

論壇徽章:
0
3 [報告]
發(fā)表于 2011-08-07 11:01 |只看該作者
回復(fù) 3# jjqing


    講的很詳細(xì),多謝
您需要登錄后才可以回帖 登錄 | 注冊

本版積分規(guī)則 發(fā)表回復(fù)

  

北京盛拓優(yōu)訊信息技術(shù)有限公司. 版權(quán)所有 京ICP備16024965號-6 北京市公安局海淀分局網(wǎng)監(jiān)中心備案編號:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年舉報專區(qū)
中國互聯(lián)網(wǎng)協(xié)會會員  聯(lián)系我們:huangweiwei@itpub.net
感謝所有關(guān)心和支持過ChinaUnix的朋友們 轉(zhuǎn)載本站內(nèi)容請注明原作者名及出處

清除 Cookies - ChinaUnix - Archiver - WAP - TOP