Microsoft Remote Data ServiceMicrosoft Remote Data Service*
*Contents  *Index  *Topic Contents

CancelUpdate Method Example

To test this example, cut and paste this code between the <Body></Body> tags in a normal HTML document and name it ADCapi6.asp. ASP script will identify your server.

<Center><H2>API Code Examples RDS 1.5</H2>
<HR><H3>Remote Data Service SubmitChanges and CancelUpdate Methods</H3>

<!-- RDS.DataControl with parameters set at design time -->
<OBJECT classid="clsid:BD96C556-65A3-11D0-983A-00C04FC29E33"
	ID=ADC>
	<PARAM NAME="SQL" VALUE="Select * from Employee for browse">
	<PARAM NAME="SERVER" VALUE="http://<%=Request.ServerVariables("SERVER_NAME")%>">
	<PARAM NAME="CONNECT" VALUE="dsn=ADCDemo;UID=ADCDemo;PWD=ADCDemo;">
</OBJECT>

<Object classid="clsid:AC05DC80-7DF1-11d0-839E-00A024A94B3A"
	CODEBASE="http://<%=Request.ServerVariables("SERVER_NAME")%>/MSADC/Samples/Sheridan.cab"
	ID=GRID1 
		datasrc=#ADC
		HEIGHT=125 
		WIDTH=495>
	<PARAM NAME="AllowAddNew"   VALUE="TRUE">
	<PARAM NAME="AllowDelete"   VALUE="TRUE">
	<PARAM NAME="AllowUpdate"   VALUE="TRUE">
	<PARAM NAME="Caption" VALUE="Remote Data Service Run Time">
</OBJECT>
<HR>
<INPUT TYPE=BUTTON NAME="SubmitChange" VALUE="Submit-Changes"><INPUT TYPE=BUTTON NAME="CancelChange" VALUE="Cancel-Update"><BR>
<H4>Add a new person or alter a current entry on the grid. Move off that Row. <BR>
Submit the Changes to your DBMS or cancel the updates. </H4>
</Center>
<Script Language="VBScript">
<!--
' Set parameters of RDS.DataControl at Run Time
Sub SubmitChange_OnClick
	ADC.SubmitChanges	
	ADC.Refresh
End Sub

Sub CancelUpdate_OnClick
	ADC.CancelUpdate
End Sub
-->
</Script>

Up Top of Page
© 1997 Microsoft Corporation. All rights reserved. Terms of Use.