Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Problem with DataGrod

Status
Not open for further replies.

TheDrParker

Programmer
Nov 21, 2001
55
US
I'm having a proglem with a DataGrid that I'm using (Not in ASP.Net). The recordset is from my SQL Server like so:

sql = "Select * From Districts"
Set TheRecordSet = Server.CreateObject("ADODB.Recordset")
TheRecordSet.Open sql, conn, 3,3

and it works for everything else.

The DataSource for the DataGrid is TheRecordSet, but it keeps giving me this error.

"Microsoft JScript runtime error '800a01b6'
Object doesn't support this property or method
/_ScriptLibrary/DataGrid.ASP, line 159"

Please help as I'm about the lose my mind. 8(
 
A data grid DTC should be bound to a recordset DTC. The recordset DTC is bound to an ADO recordset. The recordset 'Wraps' many ADO functions with a new set of simplified functions for you - and for the other DTCs to use.

The recordset DTC can contain the SELECT clause, and even include parameters in the WHERE clause - if you need the results to change depending on some variable options. You should then not need the CreateObject stuff.

Right-Click the Global.ASA to establish a named database connection for your Recordset DTCs to use. (Content Management)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top