:: Forum >> Version 1 >>

How to bind ADO recordset

I have a lot of tables that bind to ADO recordset (only IE) using the DATASRC attribute. Are Recordsets supported? If not, what is the best way to migrate?
Luca
Thursday, August 18, 2005
Best way?

Create an ASP page that returns the data in a CSV format :

open your connection
open your recordset
do while not rs.eof
str = str & rs("whatever") & "," & rs("whatever") & vbCrlf
movenext
loop
close your recordset
close your connection

The " vbCrlf " is important because it simulates a character break which it needs. You can pop the above in a function and return the string.

Then use the XML Request example (called Yahoo something if I'm not mistaken) and then modify the URL to point to the ASP file. You're also able to pass through paramters etc to filter the search somehow?

Go to town with this... it's strange how people find it difficult to integrate asp/recordsets into the grid. I found it much too easy. :D
AcidRaZor
Thursday, August 18, 2005
acid is that really "binding"? i think he meant use ado as the grid datasource like a .net datagrid, not just pop it with the output from a rs.
falseProphet
Thursday, August 18, 2005
Well if he wants to use a .net datagrid be my guest :) thats the only way I know of how to "bind" data to the client side grid
AcidRaZor
Friday, August 19, 2005
Let me clarify my question better.

IE allows binding data to HTML tags in the client. The data source can be, for instance, an XML data island or an ADO recordset (not ADO.NET). The Activewidgets package comes with an example that shows how to use it with a XML data island but does not say anything about ADO recordsets.

Binding a data source object to a table is supported by IE through the use of 2 attributes: DATASRC and DATAFLD.
Luca
Friday, August 19, 2005
Yep, I know that, but unfortunatly have no idea how to get that to work other than the method I suggested
AcidRaZor
Friday, August 19, 2005



This topic is archived.

Back to support forum

Forum search