SQL?д洢?????????????
???????????? ???????[ 2014/3/17 9:28:36 ] ????????????? SQL ?洢
??????δ????洢????
user testdatabase(?????????)
go
create procedure testname(?洢????????)
@test1 int?? @test2 nvarchar(50)
as
insert into testtable values(@test1??@test2)
return
//select * from users where truename like '%[????]%' //???????????????????????????
2 ??????
public string[] TestLogin(string uname?? string upwd)
{
try
{
SqlCommand cmd = new SqlCommand();
cmd.CommandType = CommandType.StoredProcedure;
cmd.CommandText = "User_Login";//?洢??????
cmd.Connection = conn;
cmd.Parameters.Clear();
cmd.Parameters.Add("@uname"?? SqlDbType.NVarChar?? 100).Value = uname;
cmd.Parameters.Add("@upwd"?? SqlDbType.NVarChar?? 100).Value = upwd;
string[] result = new string[3];
conn.Open();
SqlDataReader dr = cmd.ExecuteReader();
if (dr.Read())
{
result[0] = dr["qx"].ToString();
result[1] = dr["tname"].ToString();
result[2] = dr["unitid"].ToString();
dr.Close();
return result;
}
else
{
return null;
}
}
catch (Exception e)
{
throw e;
}
finally
{
conn.Close();
}
}
??????
???·???
??????????????????
2023/3/23 14:23:39???д?ò??????????
2023/3/22 16:17:39????????????????????Щ??
2022/6/14 16:14:27??????????????????????????
2021/10/18 15:37:44???????????????
2021/9/17 15:19:29???·???????·
2021/9/14 15:42:25?????????????
2021/5/28 17:25:47??????APP??????????
2021/5/8 17:01:11