哪位大哥手边有入门级的源代码,请发给我,多谢了~
wslimin2008@21cn.com
9 个解决方案
#1
我也要 dulker@263.net
#2
我已经发了,请注意查收。来自samf007@hotmail.com
#3
我想要个Winform的?ASP俺还不会呢~~~~~~~~~~
#4
private void btnSubmit_Click(object sender, System.EventArgs e)
{
string txtSSS=txtName.Text.Trim().ToString();
//依据考号姓名查询数据库
//string strConn=@"Data Source=(local);Integrated Security=SSPI;"+"Initial Catalog=examination";
string strConn="server=localhost;database=examination;uid=sa;pwd=suncaisun";
//string strComm="exec test_name '"+txtSSS+"'";
string strComm="student";
SqlConnection conn=new SqlConnection(strConn);
conn.Open();
SqlCommand comm=new SqlCommand(strComm,conn);
comm.CommandType =CommandType.StoredProcedure;
SqlParameter commParam=comm.Parameters.Add("@userid",SqlDbType.VarChar,10);
commParam.Value=txtID.Text;
commParam=comm.Parameters.Add("@username",SqlDbType.VarChar,20);
commParam.Value=txtName.Text;
commParam=comm.Parameters.Add("@strIDNAME",SqlDbType.VarChar,40);
commParam.Direction=ParameterDirection.Output;
//commParam=comm.Parameters.Add("RETURN_VALUE", SqlDbType.Int);存储过程返回值为0 表示执行成功
//commParam.Direction=ParameterDirection.ReturnValue;
comm.ExecuteNonQuery();
lbl01.Text=commParam.Value.ToString();
}
{
string txtSSS=txtName.Text.Trim().ToString();
//依据考号姓名查询数据库
//string strConn=@"Data Source=(local);Integrated Security=SSPI;"+"Initial Catalog=examination";
string strConn="server=localhost;database=examination;uid=sa;pwd=suncaisun";
//string strComm="exec test_name '"+txtSSS+"'";
string strComm="student";
SqlConnection conn=new SqlConnection(strConn);
conn.Open();
SqlCommand comm=new SqlCommand(strComm,conn);
comm.CommandType =CommandType.StoredProcedure;
SqlParameter commParam=comm.Parameters.Add("@userid",SqlDbType.VarChar,10);
commParam.Value=txtID.Text;
commParam=comm.Parameters.Add("@username",SqlDbType.VarChar,20);
commParam.Value=txtName.Text;
commParam=comm.Parameters.Add("@strIDNAME",SqlDbType.VarChar,40);
commParam.Direction=ParameterDirection.Output;
//commParam=comm.Parameters.Add("RETURN_VALUE", SqlDbType.Int);存储过程返回值为0 表示执行成功
//commParam.Direction=ParameterDirection.ReturnValue;
comm.ExecuteNonQuery();
lbl01.Text=commParam.Value.ToString();
}
#5
发了,请查收,是winform的!!!!
记得 给我分呀!!!!!!
——龙飞给你的sql winform原码!
dulker@263.net
查收
记得 给我分呀!!!!!!
——龙飞给你的sql winform原码!
dulker@263.net
查收
#6
#7
Visual C# 入门经典
中有
中有
#8
http://community.csdn.net/Expert/TopicView1.asp?id=3103179
http://218.2.112.243/datacommand.rar
http://218.2.112.243/datacommand.rar
#9
有没有自己做的啊!简单点的~上面的兄弟别着急,等一下一定给分!
#1
我也要 dulker@263.net
#2
我已经发了,请注意查收。来自samf007@hotmail.com
#3
我想要个Winform的?ASP俺还不会呢~~~~~~~~~~
#4
private void btnSubmit_Click(object sender, System.EventArgs e)
{
string txtSSS=txtName.Text.Trim().ToString();
//依据考号姓名查询数据库
//string strConn=@"Data Source=(local);Integrated Security=SSPI;"+"Initial Catalog=examination";
string strConn="server=localhost;database=examination;uid=sa;pwd=suncaisun";
//string strComm="exec test_name '"+txtSSS+"'";
string strComm="student";
SqlConnection conn=new SqlConnection(strConn);
conn.Open();
SqlCommand comm=new SqlCommand(strComm,conn);
comm.CommandType =CommandType.StoredProcedure;
SqlParameter commParam=comm.Parameters.Add("@userid",SqlDbType.VarChar,10);
commParam.Value=txtID.Text;
commParam=comm.Parameters.Add("@username",SqlDbType.VarChar,20);
commParam.Value=txtName.Text;
commParam=comm.Parameters.Add("@strIDNAME",SqlDbType.VarChar,40);
commParam.Direction=ParameterDirection.Output;
//commParam=comm.Parameters.Add("RETURN_VALUE", SqlDbType.Int);存储过程返回值为0 表示执行成功
//commParam.Direction=ParameterDirection.ReturnValue;
comm.ExecuteNonQuery();
lbl01.Text=commParam.Value.ToString();
}
{
string txtSSS=txtName.Text.Trim().ToString();
//依据考号姓名查询数据库
//string strConn=@"Data Source=(local);Integrated Security=SSPI;"+"Initial Catalog=examination";
string strConn="server=localhost;database=examination;uid=sa;pwd=suncaisun";
//string strComm="exec test_name '"+txtSSS+"'";
string strComm="student";
SqlConnection conn=new SqlConnection(strConn);
conn.Open();
SqlCommand comm=new SqlCommand(strComm,conn);
comm.CommandType =CommandType.StoredProcedure;
SqlParameter commParam=comm.Parameters.Add("@userid",SqlDbType.VarChar,10);
commParam.Value=txtID.Text;
commParam=comm.Parameters.Add("@username",SqlDbType.VarChar,20);
commParam.Value=txtName.Text;
commParam=comm.Parameters.Add("@strIDNAME",SqlDbType.VarChar,40);
commParam.Direction=ParameterDirection.Output;
//commParam=comm.Parameters.Add("RETURN_VALUE", SqlDbType.Int);存储过程返回值为0 表示执行成功
//commParam.Direction=ParameterDirection.ReturnValue;
comm.ExecuteNonQuery();
lbl01.Text=commParam.Value.ToString();
}
#5
发了,请查收,是winform的!!!!
记得 给我分呀!!!!!!
——龙飞给你的sql winform原码!
dulker@263.net
查收
记得 给我分呀!!!!!!
——龙飞给你的sql winform原码!
dulker@263.net
查收
#6
#7
Visual C# 入门经典
中有
中有
#8
http://community.csdn.net/Expert/TopicView1.asp?id=3103179
http://218.2.112.243/datacommand.rar
http://218.2.112.243/datacommand.rar
#9
有没有自己做的啊!简单点的~上面的兄弟别着急,等一下一定给分!