| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 230 人关注过本帖
标题:[求助]着程序怎么hai 过不去 xie:akuboy1982
只看楼主 加入收藏
xjtt
Rank: 1
等 级:新手上路
帖 子:6
专家分:0
注 册:2007-11-5
收藏
 问题点数:0 回复次数:0 
[求助]着程序怎么hai 过不去 xie:akuboy1982

using System;
using System.Data;
using System.Configuration;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using System.Dada.SqlClient;
public partial class _Default : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{

}
protected void Button1_Click(object sender, EventArgs e)
{

}
protected void Button1_Click1(object sender, EventArgs e)
{
sqlConnection mycon = new SqlConnection("server=(xjhsdhj);DataBase=Hsdweb2007;ID=sa;PWD=sa");
mycon.Open();
sqlCommand mycom = new Sqlcommand("select count(*)forn tb_UserData where useername='"+TextBox1.Text+"");
int count = Convert.ToInt32(mycom.ExecuteScalar());
if(count>0)
{
Response.Write("<script>alert('用户名已存在!');location='javascript:history.go(-1)'</script>");
   }
 
if(TextBox2.Text != TextBox3.Text)
{
Response.Write("<script>alert('两次输入密码不一至,从新输入!');location='javascript:history.go(-1)'</script>");
}
else
{
SqlConnection con=new SqlConnection("server=(192.168.0.7);DataBase=hsdweb2007;ID=sa;PWD=sa");
con.Open();
sqlTransaction st=con.BeginTransaction();
sqlCommand com=con.CreateCommand();
com.Transaction=sa;
try
{
com.CommandText="insert into tb_UserData(username,sex,userpwd,matter,resule,mail,headportraitID,oicq.name,del) values("+TextBox1.Text+","+DropDownlist2.Text+","+TextBox3.Text+","+TextBox5.Text+","+TextBox6.Text+","+TextBox7.Text+","+TextBox8.Text+","+TextBox9.Text+","+TextBox10.Text+")";
com.ExecuteNonQuery();
com.CommandTexe="insert into tb_log(ip,datetime,name,dns)values('"+Response.userhostaddress+"','"+DataTime.Now+"','"+TextBox1.Text+"','"+Response.userhostName+"')";
com.ExecuteNonQuery();
st.Commit();
Response.Write("<script>alert('注册成功!');location='javascript:history.go(-1)'</script>");
}
catch(exception error)
{
st.Rollback();
}

}
}
}

编译错误
说明: 在编译向该请求提供服务所需资源的过程中出现错误。请检查下列特定错误详细信息并适当地修改源代码。

编译器错误信息: CS0234: 命名空间“System”中不存在类型或命名空间名称“Dada”(是缺少程序集引用吗?)

源错误:

行 8: using System.Web.UI.WebControls.WebParts;
行 9: using System.Web.UI.HtmlControls;
行 10: using System.Dada.SqlClient;
行 11: public partial class _Default : System.Web.UI.Page
行 12: {

源文件: d:\My Documents\Visual Studio 2005\WebSites\WebSite4\BbsEnrol.aspx.cs 行: 10

搜索更多相关主题的帖子: xie hai 
2007-11-06 12:36
快速回复:[求助]着程序怎么hai 过不去 xie:akuboy1982
数据加载中...
 
   



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

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