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 sizbut on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

DAP - Stored Procedure not Loading Information

Status
Not open for further replies.

vise

Technical User
Jul 31, 2003
143
US
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
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top