Hi All,
I have a DAP(A2k3) that is based on an SP. It works fine when I start the DAP and it asks for the parameter, then it loads all the data. I then have combo box on the page to retrieve other records using the same stored procedure but with different values. I know the SP works, since it loads the data when I initially open the page. I believe where it fails is at:
--
MSODSC.SetRootRecordset "vwAllEvents-E_Name", rst
--
The code before that where I pass the value is as follows.
Dim cnn
dim rst
dim pkh
dim src
adUseClient=3
adOpenKeyset=1
adOpenDynamic=2
adOpenStatic=3
adLockOptimistic=3
adCmdStoredProc=4
Set cnn = CreateObject("ADODB.Connection")
Set rst = CreateObject("ADODB.Recordset")
adUseServer=2
adOpenStatic=3
adLockOptimistic=3
src= "spallEventsByDate "& dropdownlist0.value
rst.CursorLocation = adUseServer
rst.Source =src
rst.ActiveConnection =msodsc.datapages.Item(0).Recordset.ActiveConnection
rst.CursorType = adOpenStatic
rst.LockType = adLockOptimistic
rst.Open
IF rst.BOF AND rst.EOF THEN
msgbox "No Records" ,vbokonly
END IF
---
Thanks for your help.
-Nise
I have a DAP(A2k3) that is based on an SP. It works fine when I start the DAP and it asks for the parameter, then it loads all the data. I then have combo box on the page to retrieve other records using the same stored procedure but with different values. I know the SP works, since it loads the data when I initially open the page. I believe where it fails is at:
--
MSODSC.SetRootRecordset "vwAllEvents-E_Name", rst
--
The code before that where I pass the value is as follows.
Dim cnn
dim rst
dim pkh
dim src
adUseClient=3
adOpenKeyset=1
adOpenDynamic=2
adOpenStatic=3
adLockOptimistic=3
adCmdStoredProc=4
Set cnn = CreateObject("ADODB.Connection")
Set rst = CreateObject("ADODB.Recordset")
adUseServer=2
adOpenStatic=3
adLockOptimistic=3
src= "spallEventsByDate "& dropdownlist0.value
rst.CursorLocation = adUseServer
rst.Source =src
rst.ActiveConnection =msodsc.datapages.Item(0).Recordset.ActiveConnection
rst.CursorType = adOpenStatic
rst.LockType = adLockOptimistic
rst.Open
IF rst.BOF AND rst.EOF THEN
msgbox "No Records" ,vbokonly
END IF
---
Thanks for your help.
-Nise