G
Guest
Hi All,
I have a client connection problem with Oracle.
The exe which i did with C# (vs.net 2005) and Oracle XE , works well on my
developer machine but i am getting a connection string error on the client
side. The error comes from System.Exception class not from OracleException.
The properties of the Oracle.DataAccess reference are ;
Description: Oracle.DataAccess.dll
Runtime Version:v1.0.3705
Version: 10.2.0.100
Path: C:\oraclexe\app\oracle\product\10.2.0\server\bin\Oracle.DataAccess.dll
------------------------------------------------
The sample code is:
using System.Data;
using Oracle.DataAccess.Client;
using Oracle.DataAccess.Types;
private void button1_Click(object sender, EventArgs e)
{
OracleConnection cnn = new OracleConnection();
OracleCommand cmm = new OracleCommand();
try
{
cnn.ConnectionString = "USER ID=" + textEdit1.Text + ";PASSWORD=" +
textEdit2.Text +
";DATA SOURCE=" + textEdit3.Text + ";";
DataSet ds = new DataSet();
cmm.Connection = cnn;
cmm.Connection.Open();
cmm.CommandType = CommandType.Text;
cmm.CommandText = "SELECT * FROM FORMS";
OracleDataAdapter ad = new OracleDataAdapter(cmm);
ad.Fill(ds);
gridControl1.DataSource = ds.Tables[0];
cmm.Connection.Close();
}
catch (OracleException oexx)
{
MessageBox.Show(oexx.Message,"From OracleException");
cmm.Connection.Close();
}
catch (Exception exx)
{
MessageBox.Show(exx.Message + " --> " + exx.Source, "From Exception");
cmm.Connection.Close();
}
}
----------------------------------
And the error message is: from (catch (Exception exx) )
'user id' is an invalid connection string attribute --> Oracle.DataAccess
Any idea ?
Thanks in advance for your help.
Adam
I have a client connection problem with Oracle.
The exe which i did with C# (vs.net 2005) and Oracle XE , works well on my
developer machine but i am getting a connection string error on the client
side. The error comes from System.Exception class not from OracleException.
The properties of the Oracle.DataAccess reference are ;
Description: Oracle.DataAccess.dll
Runtime Version:v1.0.3705
Version: 10.2.0.100
Path: C:\oraclexe\app\oracle\product\10.2.0\server\bin\Oracle.DataAccess.dll
------------------------------------------------
The sample code is:
using System.Data;
using Oracle.DataAccess.Client;
using Oracle.DataAccess.Types;
private void button1_Click(object sender, EventArgs e)
{
OracleConnection cnn = new OracleConnection();
OracleCommand cmm = new OracleCommand();
try
{
cnn.ConnectionString = "USER ID=" + textEdit1.Text + ";PASSWORD=" +
textEdit2.Text +
";DATA SOURCE=" + textEdit3.Text + ";";
DataSet ds = new DataSet();
cmm.Connection = cnn;
cmm.Connection.Open();
cmm.CommandType = CommandType.Text;
cmm.CommandText = "SELECT * FROM FORMS";
OracleDataAdapter ad = new OracleDataAdapter(cmm);
ad.Fill(ds);
gridControl1.DataSource = ds.Tables[0];
cmm.Connection.Close();
}
catch (OracleException oexx)
{
MessageBox.Show(oexx.Message,"From OracleException");
cmm.Connection.Close();
}
catch (Exception exx)
{
MessageBox.Show(exx.Message + " --> " + exx.Source, "From Exception");
cmm.Connection.Close();
}
}
----------------------------------
And the error message is: from (catch (Exception exx) )
'user id' is an invalid connection string attribute --> Oracle.DataAccess
Any idea ?
Thanks in advance for your help.
Adam