sir i want to ask you that how can i fetch or get sql data
into texboxes.where i want to show record in specific
texboxes related to student information.when i click on
button all data show on texboxes when i put id or name
plz inform me on my id

Answer Posted / amit dixit

1)Create an object of CurrencyManager.
2)Take the values fetch from the table to DataView.
3)Convert dataview to type of Currency Manager.
eg:EMP Table.
Dim da As New SqlDataAdapter("SELECT * FROM EMP", sqlCon)
Dim ds As DataSet
Dim dv As DataView
Dim objCm As CurrencyManager
======================
ds = New DataSet
da.Fill(ds, "EMP")
dv = New DataView(ds.Tables("EMP"))
objCm = CType(Me.BindingContext(dv), CurrencyManager)
======================
txtEmpid.DataBindings.Clear()
txtFnm.DataBindings.Clear()
txtDeptno.DataBindings.Clear()
txtEmpid.DataBindings.Add("Text", dv, "EmpId")
txtFnm.DataBindings.Add("Text", dv, "FirstName")
txtDeptno.DataBindings.Add("Text", dv, "DeptNo")

You can iterate through the next and previous by using
Position property of CurrencyManager.

Is This Answer Correct ?    1 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Tell me how many .net languages can a single .net dll contain?

742


What is a static class?

796


Explain the advantage of option strict on?

713


Explain about the feature anonymous type?

811


what is intermediate language?

812


hello thank you for replying to my question regarding adding barcode fonts in vb.net project. I have downloaded a free font and added in my vb.net project but now i dont know how to use that i need to generate barcodes can any body help me how to use those fonts these are font3of9 .i need a small code to use these fonts to generate barcode thank u!

1792


What do you mean by serialization and deserialization?

739


How can we remove handlers at run time?

823


Explain how to send xml file on server using http protocol?

702


Before in my vb app I would just load the icons from dll. How can I load the icons provided by .net dynamically?

755


What is DLL HELL in VB.NET

804


What is the difference between system.applicationexception class and system.systemexception?

927


What is a static variable?

1144


What is the maximum size of the textbox?

767


Which is the base class for all the classes in .net framework?

804