为什么我更新数据后,数据库没有更新!我是在dw mx里做的.也没任何错误提示!
我是在dw-mx里做的数据库更新程序。为什么更新数据后,数据没有被更新。我看了坛子里的一些贴子。说要添加If Not IsPostBack什么的,大家帮我看看,在mx里生成的程序应该在哪里添加??
源代码========
<%@ Page Language="VB" ContentType="text/html" ResponseEncoding="gb2312" %>
<%@ Register TagPrefix="MM" Namespace="DreamweaverCtrls" Assembly="DreamweaverCtrls,version=1.0.0.0,publicKeyToken=836f606ede05d46a,culture=neutral" %>
<MM:Update
runat="server"
CommandText='<%# "UPDATE news SET picture_text=? WHERE biaoti=?" %>'
ConnectionString='<%# System.Configuration.ConfigurationSettings.AppSettings("MM_CONNECTION_STRING_asptest") %>'
DatabaseType='<%# System.Configuration.ConfigurationSettings.AppSettings("MM_CONNECTION_DATABASETYPE_asptest") %>'
Expression='<%# Request.Form("MM_update") = "form1" %>'
CreateDataSet="false"
SuccessURL='<%# "1.aspx" %>'
FailureURL='<%# "wrong.aspx" %>'
Debug="true"
><Parameters>
<Parameter Name="@picture_text" Value='<%# IIf((Request.Form("textarea") <> Nothing), Request.Form("textarea"), "") %>' Type="WChar" />
<Parameter Name="@biaoti" Value='<%# IIf((Request.Form("textfield") <> Nothing), Request.Form("textfield"), "") %>' Type="Char" />
</Parameters>
</MM:Update>
<MM:DataSet
id="DataSet1"
runat="Server"
IsStoredProcedure="false"
ConnectionString='<%# System.Configuration.ConfigurationSettings.AppSettings("MM_CONNECTION_STRING_asptest") %>'
DatabaseType='<%# System.Configuration.ConfigurationSettings.AppSettings("MM_CONNECTION_DATABASETYPE_asptest") %>'
CommandText='<%# "SELECT * FROM news WHERE id = ?" %>'
Debug="true"
>
<Parameters>
<Parameter Name="@id" Value='<%# IIf((Request.QueryString("id") <> Nothing), Request.QueryString("id"), "") %>' Type="Integer" />
</Parameters>
</MM:DataSet>
<MM:PageBind runat="server" PostBackBind="true" />
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>无标题文档</title>
</head>
<body>
<form runat='server' name='form1' method='POST' action="">
<table width="755" border="1">
<tr>
<td width="83">dfg</td>
<td width="348"><input name="textfield" type="text" value='<%# DataSet1.FieldValue("biaoti", Container) %>' size="80"></td>
</tr>
<tr>
<td>sdg</td>
<td><textarea name="textarea" cols="60" rows="8"><%# DataSet1.FieldValue("picture_text", Container) %></textarea></td>
</tr>
<tr>
<td> </td>
<td><input type="submit" name="Submit" value="提交"></td>
</tr>
</table>
<input type="hidden" name="MM_update" value="form1">
</form>
</body>
</html>
===============================
请各位大侠帮我解决这个困饶多时的问题!感激不尽!