473,385 Members | 2,044 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Binding Dataset to TextBox?

19
I am having trouble binding a DataSet to TextBoxes on a form.
The last line gives me this error:
"Child list for field tbl cannot be created"

my code is this:
Expand|Select|Wrap|Line Numbers
  1. Dim sql As String = "Select * From tbl Where ID=2"
  2. Dim ConString = ClassicCooking.My.Settings.Connstring
  3. Dim Conn As New SqlConnection(ConString)
  4. Dim myDataSet = New DataSet
  5.  
  6. Dim MyBinding As New BindingSource
  7. MyBinding.DataSource = myDataSet.Tables("tbl")
  8.  
  9. Dim myAdapter As New SqlDataAdapter
  10.  
  11. myAdapter.UpdateCommand = New SqlCommand()
  12. myAdapter.UpdateCommand.CommandText = "sptbl_Update"
  13. myAdapter.UpdateCommand.CommandType = CommandType.StoredProcedure
  14.  
  15. Dim field1 As New Binding("Text", myDataSet, "tbl.RZone")
  16. Me.RZone.DataBindings.Add(field1)
Jul 28 '08 #1
0 818

Sign in to post your reply or Sign up for a free account.

Similar topics

0
by: Empire City | last post by:
I have a screen: Email address: ------------ Name: -------------- Phone: ---------------- Add, Change, Delete, Cancel, Exit When the user enters the email address and hits TAB in the...
0
by: Ash | last post by:
hi, i've noticed that i can bind a textbox to a dataset's specific field, and whenever i change the dataset details, like move next, it automatically updates the textbox. How do i do this at...
13
by: Paul Slavin | last post by:
I have a textbox bound to a dataview, when I update the text in the textbox no changes take place in the underlying dataset. Why is this?? any answers appreciated, as to due to the underlying...
4
by: bardo | last post by:
Does anyone knwo how I can bind a textbox to a single dataset/dataTable row? The following will give me only a Column: textBox1.DataBindings.Add(new System.Windows.Forms.Binding("Text",...
3
by: alan | last post by:
What I would like to do is like that, a ListView data binding with a dataset which list all records of a table( for example the table list all the information of a student student_id, name,...
1
by: madhu | last post by:
Hello all, I am a bignner to vb.net I am not able to move the dataset and bind the textbox to dataset. My objective is 1) when the form loads it should display the first record. and the...
1
by: Bruce | last post by:
Hi, there, I meet a problem about comboBox binding. -------------------- Database: Northwind Tables: 1) Products 2) Categories I create a form (named "form1") to edit the record from...
6
by: p.mc | last post by:
Hi all, I'm having major problems with a userControl which contains a datagrid. My problem concerns data binding. The Page_Load() procedure calls the DataBind procedure to bind the datagrid...
3
by: Peter | last post by:
OK, so in addition to the problem I mentioned before (c.f. "Data Binding to Textbox"), I realized that my comboboxes are not really bound to the internal data set. They are just set to manually...
0
by: =?Utf-8?B?U2hlaGFiIEthbWFs?= | last post by:
This is probably an easy question but I really can’t figure the answer. In 1.1 you can add a DataSet to your page and bind a TextBox to a column in a table in the DataSet, how can this be done in...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.