Here is my situation: I have a recordset object that does not auto open on page load. I call the rs.open() method, and in the rs_onbeforeopen() method I set the sql for the recordset:
function window_onload(){
...
rs.open()
if(rs.isOpen(){
alert(rs.getCount())
}
}
function rs_onbeforeopen(){
var sql=""
sql="SELECT * from tblTable"
rs.setSQLText(sql)
alert(rs.getSQLText())
}
function rs_ondatasetcomplete(){
alert("here"
//do some stuff here
}
The sql statement that I use works fine in the query analyzer (SQL Server 2000), but the ondatasetcomplete function doesn't ever fire and the getCount after the open is called is always 0, even though the query should return 14 rows. The alert with the SQL text in it does display, so I know it goes to the onbeforeopen function. All other recordsets on the page work fine.
Does anyone have any ideas what could be going wrong with this? I have stared at it for the past couple of days with no luck.
Thanks.
function window_onload(){
...
rs.open()
if(rs.isOpen(){
alert(rs.getCount())
}
}
function rs_onbeforeopen(){
var sql=""
sql="SELECT * from tblTable"
rs.setSQLText(sql)
alert(rs.getSQLText())
}
function rs_ondatasetcomplete(){
alert("here"
//do some stuff here
}
The sql statement that I use works fine in the query analyzer (SQL Server 2000), but the ondatasetcomplete function doesn't ever fire and the getCount after the open is called is always 0, even though the query should return 14 rows. The alert with the SQL text in it does display, so I know it goes to the onbeforeopen function. All other recordsets on the page work fine.
Does anyone have any ideas what could be going wrong with this? I have stared at it for the past couple of days with no luck.
Thanks.