Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Data Binding Error - Ms Forms 2.0 Textbox

Status
Not open for further replies.

JimmyK

Programmer
Sep 8, 2000
142
VN
Hello,
Plese help me. Binding data to Microsoft Forms 2.0 TextBox error. Here is my code to bind data
Code:
 Dim da As SqlDataAdapter
  Dim cn As SqlConnection
  cn = New SqlConnection("Initial Catalog=Nhan;Data Source=localhost;Integrated Security=False;User=sa;Password=")
        da = New SqlDataAdapter("Select * from Nhansu", cn)
        da.Fill(ds, "Nhansu")
        Me.AxTextBox1.DataBindings.Add(New Binding("Text", ds.Tables("Nhansu"), "Hoten"))
Me.AxTextBox1 is Microsoft Forms 2.0 TextBox
The line
Me.AxTextBox1.DataBindings.Add(New Binding("Text", ds.Tables("Nhansu"), "Hoten"))

raise error An unhandled exception of type 'System.Reflection.TargetInvocationException' occurred in mscorlib.dll

Additional information: Exception has been thrown by the target of an invocation.


What's wrong here? pls help me

Thank a lot






Jimmy Le
nhan_tiags@yahoo.com
 
i cant see much wrong with it but forms 2.0 is still in beta release so not yet perfect.

Christiaan Baes
Belgium

If you want to get an answer read this FAQ faq796-2540
What a wonderfull world - Louis armstrong
 
Thank Christiaan,
So, do you know where to download the new version?
Thank again, and i am still waiting for solution

Jimmy Le
nhan_tiags@yahoo.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top