Dim Conn, ResultSet ' Create Adodb connection object set Conn = Server.CreateObject("adodb.connection") ' Open the connction to the System DSN 'Xtreme Sample Database 9' Conn.Open "Xtreme Sample Database 9","Admin","" ' Set the ResultSet object to all of the records which match the criteria of ' Customers in Canada set ResultSet = Conn.Execute("SPName 'Canada'")' Pass this Customer Record Set to the Database Controller through ' the setDataSource Method clientDoc.DatabaseController.setDataSource ResultSet, clientDoc.Database.Tables.Item(0).Alias, "ADORecordset"
enhydraboy(乱舞的浮尘) 谢谢你,我在刚开始的时候是使用ODBC(RDO)方式的数据连接, 然后我改成了,OLE DB(ADO)连接,现在还是一样出错;Error Type: Analysis Server (0x80004005) Invalid pointer /davidexample/viewado.asp, line 15 注:代码为(clientDoc.DatabaseController.setDataSource rs, clientDoc.Database.Tables.Item(0).Alias, "ADORecordset" )我是的ASP代码,与VB中一样. Can you help me?
' Create Adodb connection object
set Conn = Server.CreateObject("adodb.connection")
' Open the connction to the System DSN 'Xtreme Sample Database 9'
Conn.Open "Xtreme Sample Database 9","Admin",""
' Set the ResultSet object to all of the records which match the criteria of
' Customers in Canada
set ResultSet = Conn.Execute("SPName 'Canada'")' Pass this Customer Record Set to the Database Controller through
' the setDataSource Method
clientDoc.DatabaseController.setDataSource ResultSet, clientDoc.Database.Tables.Item(0).Alias, "ADORecordset"
谢谢你,我在刚开始的时候是使用ODBC(RDO)方式的数据连接,
然后我改成了,OLE DB(ADO)连接,现在还是一样出错;Error Type:
Analysis Server (0x80004005)
Invalid pointer
/davidexample/viewado.asp, line 15
注:代码为(clientDoc.DatabaseController.setDataSource rs, clientDoc.Database.Tables.Item(0).Alias, "ADORecordset" )我是的ASP代码,与VB中一样. Can you help me?