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
Explain the use of serialization and deserialization?
What is late binding and early binding?
How many languages are supported by .net?
Why do you need Lock in Visual Basic?
Described strong typing
How to store images in sql server database through vb.net?
What is strong typing and weak typing?
What would you do to remove microsoft visual basic name space?
Can you please explain the difference between system.string and system.stringbuilder classes?
What are the difference between dispose(), close(), exit(), end()? When do we use them?
how to deploy vb.net with key and evaluation time? any one can help me?
What is enumerator?
What are all the differences between dispose and finalize()?
thak you Mr Govind for replying to my question. My next question is that how to retrieve image stored in an SQL server table and assign it to any image control or picture control using VB.net
What are the different types of applications supported in .net (or) .net framework?