I've got a data access page that I'm posting a form field named ClientID to in hopes of avoiding the prompt that the stored procedure forces. This site is still very much in development and using some staticly defined values to retrieve the first bit of data you see and the CleintID that the form passes.
..this is the form that passes ClientID as a hidden form field.
..click on Manage My Accounts
The desired state is that the data access page would skip the prompt and utilize the form-passed variable to satisfy the stored procedure which expects @ClientID to exist...
I've ben trying to concoct a vbscript function on the data access page(which I am new to) that would use the body onload event to define the ASP variable for the passed value and create some variables that hopefully the proc would like, but ...this doesn't work...I think because despite the data access page being an ASP, the XML is being rendered first, thus fires off the connection for the recordset before the onload event occurs.
--------------------------------------------------------
<SCRIPT language=vbscript event=onload for=MSODAPDEFAULTS>
<!--
ClientID=Session("ClientID")
Set cmdgetparams=Server.CreateObject("ADODB.Command")
With cmdgetparams
.ActiveConnection=Application("wrs_ConnectionString")
.CommandText= "mydebtors"
.CommandType=adCmdStoredProc
.Parameters.Append.CreateParameter("@ClientID",adInteger,adParamInput, ,ClientID)
.Execute lngRecs, , adExecuteNoRecords
End With
Set cmdgetparams=Nothing
-->
</SCRIPT>
----------------------------------------------------------
Below is the stored procedure that the data access page uses as it's recordsource...simple enough...
-----------------------------------------------------------
SELECT '/client_access/debtorpayments.asp?DebtorID=' + CONVERT(char(6), DebtorID) AS paymentlink, dbo.TblDebtors.*, ClientID AS Client
FROM dbo.TblDebtors
WHERE (ClientID = @ClientID)
-----------------------------------------------------------
Another small(I'm sure) issue is that I've somehow busted this data access page and all the fields are disabled and new records can't be added...was working yesterday??(scratching head)
Any help would be greatly appreciated.
...and keep in mind, the longer you wait to help me, the more likely I'll screw it up worse ;-)
Thank you,
Steve
Steve
---------------------------------------
IF WebApplicationProgrammer = True Then
ElectronicSheepHerder = True
End If
..this is the form that passes ClientID as a hidden form field.
..click on Manage My Accounts
The desired state is that the data access page would skip the prompt and utilize the form-passed variable to satisfy the stored procedure which expects @ClientID to exist...
I've ben trying to concoct a vbscript function on the data access page(which I am new to) that would use the body onload event to define the ASP variable for the passed value and create some variables that hopefully the proc would like, but ...this doesn't work...I think because despite the data access page being an ASP, the XML is being rendered first, thus fires off the connection for the recordset before the onload event occurs.
--------------------------------------------------------
<SCRIPT language=vbscript event=onload for=MSODAPDEFAULTS>
<!--
ClientID=Session("ClientID")
Set cmdgetparams=Server.CreateObject("ADODB.Command")
With cmdgetparams
.ActiveConnection=Application("wrs_ConnectionString")
.CommandText= "mydebtors"
.CommandType=adCmdStoredProc
.Parameters.Append.CreateParameter("@ClientID",adInteger,adParamInput, ,ClientID)
.Execute lngRecs, , adExecuteNoRecords
End With
Set cmdgetparams=Nothing
-->
</SCRIPT>
----------------------------------------------------------
Below is the stored procedure that the data access page uses as it's recordsource...simple enough...
-----------------------------------------------------------
SELECT '/client_access/debtorpayments.asp?DebtorID=' + CONVERT(char(6), DebtorID) AS paymentlink, dbo.TblDebtors.*, ClientID AS Client
FROM dbo.TblDebtors
WHERE (ClientID = @ClientID)
-----------------------------------------------------------
Another small(I'm sure) issue is that I've somehow busted this data access page and all the fields are disabled and new records can't be added...was working yesterday??(scratching head)
Any help would be greatly appreciated.
...and keep in mind, the longer you wait to help me, the more likely I'll screw it up worse ;-)
Thank you,
Steve
Steve
---------------------------------------
IF WebApplicationProgrammer = True Then
ElectronicSheepHerder = True
End If