By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
443,627 Members | 2,339 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 443,627 IT Pros & Developers. It's quick & easy.

'user id' is an invalid connection string attribute error on Oracle....

P: n/a
Hi All,

I have a client connection problem with Oracle.
The exe which i did with C# ( 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
Path: C:\oraclexe\app\oracle\product\10.2.0\server\bin\O racle.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();
cnn.ConnectionString = "USER ID=" + textEdit1.Text + ";PASSWORD=" +
textEdit2.Text +
";DATA SOURCE=" + textEdit3.Text + ";";
DataSet ds = new DataSet();
cmm.Connection = cnn;
cmm.CommandType = CommandType.Text;
cmm.CommandText = "SELECT * FROM FORMS";
OracleDataAdapter ad = new OracleDataAdapter(cmm);
gridControl1.DataSource = ds.Tables[0];

catch (OracleException oexx)
MessageBox.Show(oexx.Message,"From OracleException");
catch (Exception exx)
MessageBox.Show(exx.Message + " --" + exx.Source, "From Exception");
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.

Jan 5 '08 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.