小编rus*_*ian的帖子

启动服务时出错.找不到OracleMTSRecoveryService

我在Windows 7专业版64位上安装oracle 11g企业版时遇到此错误.我检查了注册表,因为有人提到但正确的事情已经存在.如果尝试从Services.msc启动服务,它说服务也没有找到

oracle oracle11g

9
推荐指数
1
解决办法
4万
查看次数

使用带有存储过程的C#从sql数据库中检索数据

每当我尝试从我的数据库中检索数据时,我都会变为空.我正在使用的代码如下:

protected void Button2_Click(object sender, EventArgs e)
 {
    SqlConnection myConnection = new SqlConnection(GetConnectionString());
    SqlCommand cmd = new SqlCommand("spSelectCustomer", myConnection);
    cmd.CommandType = CommandType.StoredProcedure;
    myConnection.Open();

    SqlParameter custId = cmd.Parameters.Add("@CustomerId", SqlDbType.Int);
    custId.Direction = ParameterDirection.Input;
    custId.Value = 10;

    SqlDataReader dr = cmd.ExecuteReader(CommandBehavior.CloseConnection);

    Label1.Text = dr["FirstName"].ToString();
    Label2.Text = dr["LastName"].ToString();
    Label3.Text = dr[3].ToString();
    Label4.Text = dr["Email"].ToString();
}
private static string GetConnectionString()
{
    return ConfigurationManager.ConnectionStrings["Lab3ConnectionString"].ConnectionString;
}
Run Code Online (Sandbox Code Playgroud)

c# sql-server asp.net stored-procedures

6
推荐指数
1
解决办法
5万
查看次数

标签 统计

asp.net ×1

c# ×1

oracle ×1

oracle11g ×1

sql-server ×1

stored-procedures ×1