View Full Version : Possible methods of recordset object?

02-13-2004, 05:32 AM
I would like to populate an array with specific data from an Active X TDC object, however, the only methods I can find on the subject are: BOF(), EOF(), absolutePosition(), MoveFirst(), MoveLast(), MoveNext(), & MovePrevious(). The only properties that I can find are Sort, Filter, and Reset. Does anyone know what the available methods and properties are, or where I can find that information? Thanks in advance! Here is the function for more clarification.

var recordSet = myObject.recordset;
var myArray = new Array();

function initializeArray()
&#160 {
&#160&#160 recordSet.BOF;
&#160&#160 for(var i=0; !recordSet.EOF; i++)
&#160&#160&#160 {
&#160&#160&#160&#160 myArray[i] = recordSet.Insert Method Here ;
&#160&#160&#160&#160 recordSet.MoveNext();
&#160&#160&#160 }
&#160 }

02-13-2004, 05:54 AM
Here's the ADO Recordset Reference (http://www.devguru.com/Technologies/ado/quickref/recordset.html)

If you want to put the content of the recordset into an array, you don't have to loop through the recordset. Use the getRows() method.

02-13-2004, 05:57 AM
There's a Tabular Data Control Reference (http://msdn.microsoft.com/workshop/database/tdc/reference/Tabular_Data_Control_ref_entry.asp) in the SDK.

For less documented objects, the OLE/COM Object Viewer (http://www.microsoft.com/com/resources/oleview.asp) allows you to view their type library, which lists all methods (look in the CoClasses section of the typelib).

02-13-2004, 04:55 PM
The object is a TDC, not an ADO recordset. GetRows() is a VBscript function. Please read posts before responding.
I believe that I may have found a possible workaround for the problem, but I would still like to know if there are any other methods available to this type of object. If the solution works, I will post it.

02-16-2004, 02:39 AM
I just assumed TDC uses ADO to access the database. Of course, I might be wrong, I haven't used TDC before. And I know GetRows() is a VBScript function. Actually, you can use the VBScript ADO reference in javascript (of course, in IE only). Just follow the camelCasing naming convention of properties and methods in Javascript.
i.e. GetRows() --> getRows()

02-16-2004, 03:15 AM
Originally posted by rtainge
The object is a TDC, not an ADO recordset... Please read posts before responding.
It seems that the real problem was not that glenngv misread your post:

All methods you referred to are part of the ADO type libraries; none of them belong to the TDC.