Categories: MSDN / DotNet / Java / Scripts / Linux / PHP Ask - La ask - La Answer

DMO vs. ADO

With DMO, when you execute a SQL or stored procedure that returns data from multiple tables, it is stored in separate resultsets and you can tell how many by looking at something like '$resultref->ResultSets'... how is the same data returned when using ADODB.recordset? since you normally query using something like '$RS = $Conn->Execute($Sql)', does this one recordset contain the data from all tables (ie. all resultsets are returned via one recordset object)? or...??

any help is greatly appreciated!!

K.
[551 byte] By [meowmeow] at [2007-11-11 9:42:03]
# 1 Re: DMO vs. ADO
Yes, all resultsets are returned in a single recordset object. You use the NextRecordset method to get the next resultset. Here's an example: http://www.freevbcode.com/ShowCode.asp?ID=3058
Phil Weber at 2007-11-11 23:43:44 >
# 2 Re: DMO vs. ADO
thanks phil :D

just one more question... with the DMO object, you can check the status of the server agent with JobServer->Status and start it up with JobServer->Start()... any ideas on how i can accomplish this without DMO and only using a ADO connection object... or is it possible at all?
meowmeow at 2007-11-11 23:44:44 >
# 3 Re: DMO vs. ADO
I'm pretty sure it's not possible to access the server agent from standard ADO. ADO is database-agnostic; it doesn't know anything about the SQL Server agent.
Phil Weber at 2007-11-11 23:45:48 >