Forums
This topic is locked
MM Update After Procedure. [HELP!]
Posted 03 May 2007 21:27:34
1
has voted
03 May 2007 21:27:34 steven Macquoy posted:
I want to excecute MMupdate after an if function. When i Click the button the db is updated but the values are incorrect because the if function did not run!
My Code:
<pre id=code><font face=courier size=2 id=code>Sub BtnVote (Src As Object, E As EventArgs)
If rb1.Checked = True
Session("Hits01"


Else if rb2.Checked = True
Session("Hits02"


End if
End Sub</font id=code></pre id=code>
The MM Update:
<pre id=code><font face=courier size=2 id=code><MM:Update
runat="server"
CommandText='<%# "UPDATE Poll SET PollHit4=?, PollHit3=?, PollHit1=?, PollHit2=? WHERE PollId=?" %>'
ConnectionString='<%# System.Configuration.ConfigurationSettings.AppSettings("MM_CONNECTION_STRING_db"

DatabaseType='<%# System.Configuration.ConfigurationSettings.AppSettings("MM_CONNECTION_DATABASETYPE_db"

Expression='<%# Request.Form("MM_update"

CreateDataSet="false"
Debug="true"
>
<Parameters>
<Parameter Name="@PollHit4" Value='<%# IIf((Request.Form("Hdn4"



<Parameter Name="@PollHit3" Value='<%# IIf((Request.Form("Hdn3"



<Parameter Name="@PollHit1" Value='<%# IIf((Request.Form("Hdn1"



<Parameter Name="@PollHit2" Value='<%# IIf((Request.Form("Hdn2"



<Parameter Name="@PollId" Value='<%# IIf((Request.Form("HdnID"



</Parameters>
</MM:Update>[/i]
</font id=code></pre id=code>
Has someone an idea how i can run the Update command thrue the Sub Procedure.
Thanks!!!