access 不能写入中文
请教各位高手,我是一个初学者!
我的数据库里有两张表,一张可以插入中文!而另一张只能写入数字或字母,只要写入中文数据库里就会是乱码!(数据库字段类型也是文本)
出现乱码这张表在插入数据的时候是用 "风声无组件 "上传的图片!
代码如下:
<%@LANGUAGE= "VBSCRIPT " CODEPAGE= "65001 "%>
<%
'----------------------
'***************** 风声无组件上传类 2.11 *****************
'用法举例:快速应用[添加产品一]
'该例主要说明默认模式下的运用
'以常见的产品更新为例 <br>
'该例以UTF-8字符集测试
'下面是上传程序(upload.asp)的代码和注释
'**********************************************************
'----------------------
'OPTION EXPLICIT
Server.ScriptTimeOut=5000
%>
<!--#include file= "config/conn.asp " -->
<!--#include file= "UpLoadClass.asp " -->
<%
dim request2
'建立上传对象
set request2=New UpLoadClass
'设置字符集
request2.Charset= "UTF-8 "
'打开对象
request2.Open()
%>
<%
dim m_pic,m_fenlei,h_name
m_pic=(request2.SavePath&request2.Form( "m_pic "))
m_fenlei=Request2.Form( "m_fenlei ")
h_name=Request2.Form( "h_name ")
'response.Write(m_pic)
'response.End()
set rs=server.createobject( "adodb.recordset ")
sql= "select * from pictuer "
rs.open sql,conn,3,2
rs.addnew
rs( "m_mingcheng ")=request2.Form( "m_mingcheng ")
rs( "m_fenlei ")=m_fenlei
rs( "m_name ")=h_name
rs( "m_pic ")=m_pic
rs( "m_jinjia ")=request2.Form( "m_jinjia ")
rs( "m_meicitypifajia ")=request2.Form( "m_meicitypifajia ")
rs( "m_shuoming ")=request2.Form( "m_shuoming ")
rs( "m_maichushuliang ")=request2.Form( "m_maichushuliang ")
rs.update
rs.close
%>
<%
'释放上传对象
set request2=nothing
%>
------解决方案--------------------request2.Charset= "UTF-8 " -> request2.Charset= "gb2312 "
CODEPAGE= "65001 " -> CODEPAGE= "20936 "