using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using Oracle.DataAccess.Client;
namespace TurnFC
{
public partial class Form1 : Form
{
OracleConnection myConn;
String connectionString;
public Form1()
{
InitializeComponent();
}
private void button1_Click(object sender, EventArgs e)
{
connectionString = "Data Source=orcl;User ID=system;PassWord=system;";
// 连接oracle
myConn = new OracleConnection(connectionString);
try
{
myConn.Open();
}
catch (Exception ee)
{
MessageBox.Show(ee.Message.ToString());
}
string sqlstr = "select * from user_users ";
OracleDataAdapter sda = new OracleDataAdapter(sqlstr, myConn);
DataSet myds = new DataSet();
sda.Fill(myds);
GridView1.DataSource = myds;
GridView1.Refresh();
}
}
}
错误提示:
未能加载文件或程序集“Oracle.DataAccess, Version=2.112.1.0, Culture=neutral, PublicKeyToken=89b483f429c47342”或它的某一个依赖项。试图加载格式不正确的程序。
3 个解决方案
#1
这样试一下吧
#2
我试了,一样不好使
#3
请问解决了吗?
#1
这样试一下吧
#2
我试了,一样不好使
#3
请问解决了吗?