TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Mohammad Ishaq
NA
55
19k
Help to correct the code for text box
May 31 2014 10:33 AM
I have two text box on vb form and i am using access table . i want to receive data from two column in to my two text box .
I have write the code and debug it successfully but there is no data show in the boxes.
Please guide me to solve my problem.Thanks
The code are
Public Class Form1
Dim cn As System.Data.OleDb.OleDbConnection
Private Sub EmplysrceDataBindingNavigatorSaveItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)
cn = New System.Data.OleDb.OleDbConnection
cn.ConnectionString = ("Provider=Microsoft.JET.OLEDB.4.0;" & "Data Source=E:\a.mdb;")
cn.Open()
Showitems()
End Sub
Private Sub Showitems()
Dim ds As New DataSet
Dim dt As New DataTable
ds.Tables.Add(dt)
Dim da As New OleDb.OleDbDataAdapter
da = New OleDb.OleDbDataAdapter("Select * From EmplysrceData", cn)
da.Fill(dt)
TextBox1.Text = dt.Rows(1).Item(0)
TextBox2.Text = dt.Rows(1).Item(1)
cn.Close()
End Sub
End Class
Reply
Answers (
2
)
XLS, XLSX and CryptoLocker Virus
What do you think the use of Ribbon Control