请问一下,在提交表单的时候,那表单内容不支持中文。英文就可以,这到底是怎么一个回事。
先谢过了。
<%@ Import Namespace ="System.Data" %>
<%@ Import Namespace ="System.Data.SqlClient" %>
<%@ Page Language="VB" Debug="true" %>
<%
'接收表单送过来的数据
'------------------------------------------------------------------
Dim useName As String = Request.Form("useName").ToString() '姓名
Dim useMetier As String = Request.Form("useMetier").ToString() '职业
Dim useMailId As String = Request.Form("useMailId").ToString() 'Mail地址
Dim useAddress As String = Request.Form("useAddress").ToString() '祥细地址
Dim useAdvise As String = Request.Form("useAdvise").ToString() '建议
'连接数据库
'------------------------------------------------------------------
Dim strConn As String = "Integrated Security=true;database=test;"
Dim strComm As String = "select 姓名,职业, Email地址,详细地址,有何建议from ta"
Dim myConnection As New SqlConnection(strConn) '连接
Dim myDataset As New DataSet() '数据集
Dim myDataAdapter As SqlDataAdapter
myDataAdapter = New SqlDataAdapter(strComm, myConnection) '适配器
myDataAdapter.Fill(myDataset, "ta") '填充Dataset
Dim myRows As DataRow = myDataset.Tables("ta").NewRow()
myRows("姓名") = useName
myRows("职业") = useMetier
myRows("Email地址") = useMailId
myRows("详细地址") = useAddress
myRows("有何建议") = useAdvise
myDataset.Tables("ta").Rows.Add(myRows)
Dim myCommandbuilder As New SqlCommandBuilder(myDataAdapter)
myDataAdapter.InsertCommand = myCommandbuilder.GetInsertCommand()
myDataAdapter.Update(myDataset, "ta") '更新数据
%>
补充:
我的代码是这样的。是不是少了对字符的编码,如果是我应该怎么加?