| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 394 人关注过本帖
标题:[求助]commandtype到底怎么写啊
只看楼主 加入收藏
zq200487731
Rank: 1
等 级:新手上路
帖 子:1
专家分:0
注 册:2006-11-14
收藏
 问题点数:0 回复次数:0 
[求助]commandtype到底怎么写啊
<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<!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>
<p>用户名:<%=request.Form("name")%></p>
<p>密码:<%=request.Form("pwd")%></p>
<p>确认密码:<%=request.Form("repwd")%></p>
<p>姓名:<%=request.Form("fname")%></p>
<p>性别:<%=request.Form("sex")%></p>
<p>联系电话:<%=request.Form("tele")%></p>
<p>email:<%=request.Form("email")%></p>
<p>住址:<%=request.Form("address")%></p>
<p>邮编:<%=request.Form("yb")%></p>
<%
dim names,pwd,repwd,fname,sex,tele,email,address,yb,conn,com
names=trim(request.Form("name"))
pwd=trim(request.Form("pwd"))
fname=trim(request.Form("fname"))
sex=trim(request.Form("sex"))
tele=trim(request.Form("tele"))
email=trim(request.Form("email"))
address=trim(request.Form("address"))
yb=trim(request.Form("yb"))
set conn=Server.CreateObject("ADODB.connection")
conn.open "DSN=sql;uid=sa;pwd=sa"
set com=Server.CreateObject("ADODB.command")
com.ActiveConnection=conn
com.commandtext="insert into user(names,pwd,fname,sex,tele,email,address,yb)values(?,?,?,?,?,?,?,?)"
com.commandtype=adCmdText
Set MyFirstParam=com.CreateParameter("names",adVarChar,adParaminput,10)
com.Parameters.Append.MyFirstParam
Set MySecondParam=com.CreateParameter("pwd",adVarchar,adParaminput,10)
com.Parameters.Append.MyFristParam
Set three=com.CreateParameter("fname",adVarchar,adParaminput,10)
com.Parameters.Append.three
Set fore=com.CreateParameter("sex",adVarchar,adParaminput,10)
com.Parameters.Append.fore
Set five=com.CreateParameter("tele",adVarchar,adParaminput,10)
com.Parameters.Append.five
Set six=com.CreateParameter("email",adVarchar,adParaminput,10)
com.Parameters.Append.six
Set seven=com.CreateParameter("address",adVarchar,adParaminput,10)
com.Parameters.Append.seven
Set eight=com.CreateParameter("yb",adVarchar,adParaminput,10)
com.Parameters.Append.eight
com.parameters("names")=names
com.parameters("pwd")=pwd
com.parameters("fname")=fname
com.parameters("sex")=sex
com.parameters("tele")=tele
com.parameters("email")=email
com.parameters("address")=address
com.parameters("yb")=yb
if com.execute then
%>
<script language="javascript">
alert("chenggong")
</script>
<%
response.End()
conn.close
else
response.Write("有问题")
response.end()
conn.close
end if
%>
</html>
运行就说commandtype哪儿有问题
搜索更多相关主题的帖子: commandtype 
2006-11-14 21:41
快速回复:[求助]commandtype到底怎么写啊
数据加载中...
 
   



关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.029620 second(s), 7 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved