access换成sql server 2005我木了?一点不会呀?高手指点?

来源:百度知道 编辑:UC知道 时间:2024/05/02 12:56:33
我会asp+access
但是我换成sql server 2005
就一点也不会了
谁有能教教我具体整么办??
sql server 2005一点都不会
我只求能实现asp连接上sql server 2005能读写数据库
可是我一点也不懂
谢谢高手教教
谢谢了

public override Dictionary GetDictionaryByCode(string code)
{
Dictionary dictionary = null;

SqlCommand cmd = new SqlCommand();
AddParamToSQLCmd(cmd, "@Code", SqlDbType.VarChar, 20, ParameterDirection.Input, code);
SetCommandType(cmd, CommandType.StoredProcedure, SP_GET_DICTIONARY_BY_CODE);

using (SqlConnection connect = new SqlConnection(Connecionstring))
{
connect.Open();
cmd.Connection = connect;
SqlDataReader reader = cmd.ExecuteReader();

if (reader.Read())
{
dictionary = new Dictionary();
dictionary.ParentCode = (string)reader["ParentCode"];
dictionary.Name = (string)reader["Name"];
dictionary.ID = (Guid)reader["