We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

binding to the text box

Thread ID:




44536 May 25,2006 08:59 PM UTC WinForms 0
Tags: FAQ
Asked On May 25, 2006 08:59 PM UTC

Hi, I am using OleDbConnection , OleDbAdapter, OledbCommand with parameter I am having problem with binding the textbox''s text property with the result. I am sending the code also: string strOleDb; strOleDb = @"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=c:\kp\db1.mdb"; OleDbConnection cn = new OleDbConnection(); cn.ConnectionString = strOleDb; string searchText = "select programs_interest from follow_up_report where no_of_children = ?"; OleDbDataAdapter da = new OleDbDataAdapter(searchText, cn); OleDbCommand selectCommand = new OleDbCommand(searchText,cn); da.SelectCommand = selectCommand; selectCommand.Parameters.AddWithValue("no_of_children", no_of_childrenTextBox.Text); DataSet ds = new DataSet("follow_up_report"); da.Fill(ds, "follow_up_report"); programs_interestTextBox.DataBindings.Add("Text", ds.Tables["follow_up_report"], "programs_interest"); this is giving the following error : This causes two bindings in the collection to bind to the same property. Parameter name: binding Let me know. My email address: manuaz1@yahoo.com Thank you.


This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

or the page will be automatically redirected to sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon