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



sir i want to ask you that how can i fetch or get sql data into texboxes.where i want to show recor..

Answer / 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

More VB.NET Interview Questions

hello dear friends my problem is that i want to save images that is pictures in SQL server using vb.net can any body help me to do so please

1 Answers  


in my windows application i have to show excelwork sheetwhich is stored in the local system can any one tell me the code?

1 Answers  


Explain about garbage collection?

0 Answers  


What is a static variable?

0 Answers  


hello! I am developing software in vb6 and vb.net separately which i need to generate barcodes e.g i have a string "182346-u",so the problem is that how to generate barcode from this type of string can any body help me please thanks regard !

2 Answers  






Is vb.net a programming language?

0 Answers  


What is the top .net class that everything is derived from?

0 Answers  


What is difference between import system.data.sqlclient,system.data.oledb?

0 Answers  


Which dll is used for microsoft .net run time?

0 Answers  


What are the different variables in vb.net?

0 Answers  


I want to sample Hotel management project in vb.net because still now i am doing that project for small hotel....so please send me my email id is jmuthu_pearls@yahoo.com...

4 Answers   Sapphire Comfort Hotel, TATA,


What is jagged array in vb.net?

0 Answers  


Categories