AccessViolationException未处理错误

时间:2011-05-04 08:31:11

标签: visual-studio-2010 odp.net

这是错误,

enter image description here

这是代码,

protected void Button1_Click(object sender, EventArgs e)
        {
            OracleConnection con;

            try
            {
                con = new OracleConnection();
                con.ConnectionString = "data source=(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=xxxx)(PORT=1551))                   (CONNECT_DATA=(SERVICE_NAME=xxx)));user id=xxx;password=xxx;";
                con.Open();
                message.Text = con.ServerVersion;
                con.Dispose();


            }
            catch (Exception ex)
            {
                message.Text = ex.Message.ToString();
            }
            finally
            {
               // con.Dispose();
            }


        }

0 个答案:

没有答案
相关问题