Skip to Main Content

DevOps, CI/CD and Automation

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

oracle connection problem...

user13328581Sep 15 2011 — edited Dec 13 2011
dear all;

I have the following syntax below
 protected void Button1_Click(object sender, EventArgs e)
    {

 string oradb = "User Id=finance;Password=finace1;Data Source=XE";
        string sql = "select ID, Create_date from t_mobile";
        OracleDataAdapter adapter = new OracleDataAdapter(oradb, sql);
        OracleCommandBuilder builder = new OracleCommandBuilder(adapter);

        DataSet dataset = new DataSet();

        adapter.Fill(dataset, "t_mobile");

        DataTable mytable = dataset.Tables["t_mobile"];

        GridView1.DataSource = mytable;
        GridView1.DataBind();
    }
but I keep getting the error message connection not well formatted, how I do connect to my sql*plus using visual web developer 2010 express for practicing purposes. thank you. a simple code example will also help
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Nov 30 2011
Added on Sep 15 2011
12 comments
5,715 views