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
What do you mean by option strict on?
Explain the difference between import system.data.sqlclient and system.data.oledb?
Why do we use ansi keyword?
Explain trace in vb.net?
What is the importance of a Button control?
Which is the base class for all the classes in .net framework?
What are different types of jit ?
What is the diff between vb mdi form and .net mdi form?
What is a stream in vb.net?
Explain the difference between int and int32?
Explain cts?
Explain the advantages of migrating to vb.net?
What is difference between import system.data.sqlclient,system.data.oledb?
how to get dynamic control array position or its index position?
What is econo-jit?