开发者

PHP - ADO recordsets

I am referencing a COM component from PHP. This COM component returns records using ADO.

I开发者_运维问答 am assuming I will need to reference ADO in PHP for this to function. How do I do this?

Secondly (related to the first question) I have run accross ADODB abstraction libraries, however these seem to mostly deal with queries and handle the ADO internally. How do I get the returned ADO recordset into a PHP friendly array, and likewise pass in an ADO array to the COM object?

Thank you, Josh


$con = new COM('ADODB.Connection');
$con->ConnectionString = 'my connect string here';

$cmd = new COM('ADODB.Command');
....

when calling methods that have "optional" parameters use the following to skip them:

new VARIANT(VT_UNKNOWN);

http://www.w3schools.com/ADO/

This site contains a lot of the base ADO classes and enums that you'll need. But I would recommend having a ADO book. Then its mainly a using those examples while changing . to -> when referencing COM object properties and methods.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜