Problem with Dataset

R

Rado

Hello.
I have one question.
I make form1 and form2.
In form1 I make connection to databasee, make dataadpater, and generate
dataset.
On Form1 I have one Textbox. This textbox I bind with dataset.
And on Form2 I have textbox too, but I wouldn`t make connection, dataadpter,
and generate dataset, I want this textbox bind with dataset in Form1.
Have any idea How can I do it?

I think that I can write this:
****************************************************************************
****
Private Sub Form2_Load(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load

Dim frm As Form1

TextBox1.DataBindings.Add("Text0", frm.DataSet11, "moj.meno")

End Sub

****************************************************************************
***************

But probaly is wrong, because VB.NET while compling show error.



Thank You very much for yours answer.
 
J

Josip Habjan

Rado said:
Hello.
I have one question.
I make form1 and form2.
In form1 I make connection to databasee, make dataadpater, and generate
dataset.
On Form1 I have one Textbox. This textbox I bind with dataset.
And on Form2 I have textbox too, but I wouldn`t make connection, dataadpter,
and generate dataset, I want this textbox bind with dataset in Form1.
Have any idea How can I do it?

I think that I can write this:
****************************************************************************
****
Private Sub Form2_Load(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load

Dim frm As Form1

TextBox1.DataBindings.Add("Text0", frm.DataSet11, "moj.meno")

End Sub



Private Const CST_FIELD_FIRSTNAME As String = "USERS.Ime"

txtFirstName.DataBindings.Add(New Binding("Text", m_dsMain,
CST_FIELD_FIRSTNAME))

search for help on 'BindingManagerBase'



Regards,

Josip Habjan
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top