<script>ec(2);</script>
php文件
define ("OLEDB_CONNECTION_STRING",
"Provider=SQLOLEDB; Data Source=zzb; Initial Catalog=Northwind; User ID=sa; Password=");
$dbc = new COM("ADODB.Connection");
$dbc->Open(OLEDB_CONNECTION_STRING);
$command = "sp_mystoreprocedure";
$rs = $dbc->Execute($command); // Recordset
$i = 0;
echo
Directive |
Local Value |
Master Value |
;
while (!$rs->EOF) {
$i += 1;
$fld0 = $rs->Fields(0);
$fld1 = $rs->Fields(1);
$fld2 = $rs->Fields(2);
print
;
print $fld0->value;
print
|
;
print $fld1->value;
print |
;
print $fld2->value;
print |
;
$rs->MoveNext();
}
print
;
$rs->Close();
?>
注意的是,你的服务器必须打开!另外,就是不能写错存贮过程的名称。否则会出项致命的错误,而且,你根本就不知道错误在那里,这就是php文件对错误处理的不好之处,但相信它以后是会改进的。
Statement:The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn