hi dear I was trying to use following code ..but it is not working properly. Imports System.Data.OleDb Public Class Form1 Inherits System.Windows.Forms.Form Dim cn As OleDbConnection Dim cmd As OleDbCommand Dim dr As OleDbDataReader Private Sub Form1_Load(ByVal sender As System.Object, ByVal e as _ System.EventArgs) Handles MyBase.Load End Sub Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As_ System.EventArgs) Handles Button1.Click Try cn = New OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;_ Data Source=C:\emp.mdb;") 'provider to be used when working with access database cn.Open() cmd = New OleDbCommand("select * from table1", cn) dr = cmd.ExecuteReader While dr.Read() TextBox1.Text = dr(0) TextBox2.Text = dr(1) TextBox3.Text = dr(2) ' loading data into TextBoxes by column index End While Catch End Try dr.Close() cn.Close() End Sub End Class regards adil
v450305
Posts
-
Database. -
Database.Hi Dear, How to connect MS Access database using ASP.net regards adil
-
Creating a new row.hi dear I tried to find a lot ...as i am new to vb.net therefore suffering to solve my problem. I used following code to retrive data.. Now i want to insert...but unable to do so... Imports System.Data.OleDb Public Class Form1 Inherits System.Windows.Forms.Form Dim cn As OleDbConnection Dim cmd As OleDbCommand Dim dr As OleDbDataReader Private Sub Form1_Load(ByVal sender As System.Object, ByVal e as _ System.EventArgs) Handles MyBase.Load End Sub Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As_ System.EventArgs) Handles Button1.Click Try cn = New OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;_ Data Source=C:\emp.mdb;") 'provider to be used when working with access database cn.Open() cmd = New OleDbCommand("select * from table1", cn) dr = cmd.ExecuteReader While dr.Read() TextBox1.Text = dr(0) TextBox2.Text = dr(1) TextBox3.Text = dr(2) ' loading data into TextBoxes by column index End While Catch End Try dr.Close() cn.Close() End Sub End Class regards adil
m.adil.farooq mcs & acca adil-farooq@maktoob.com
-
creating an animationHi Dear . how to create an animation. regards adil
-
Creating a new row.Hi Please advise me how to enter a new row in Microsoft Access Database by using vb.net. regards adil
-
ERDthanks for your reply. I got an assignment.... to design a online application form for an educational institute. Please advise me your email address please ..i will send u request in complete detail. hoping for your kind words. regards adil
-
ERDHi dear, I am new to asp.net. What would be ERD for online admission form for an educational institute. regards adil
m.adil.farooq mcs & acca adil-farooq@maktoob.com
-
Online ApplicationHi dear. How can i design online application form using asp.net and microsoft access as a database tool Please advise me regards adil
m.adil.farooq mcs & acca adil-farooq@maktoob.com
-
New to asp.netHi dear As we use code Dim DLG As New Form DLG.Showdialog() while working with multiple forms using vb.net.. Please advise me what would be the coding for asp.net while working with multiple forms. regards adil
m.adil.farooq mcs & acca adil-farooq@maktoob.com
-
New to vb.netThanks.
m.adil.farooq mcs & acca adil-farooq@maktoob.com
-
New to vb.netHi dear I am very new to vb.net and here too...Please help me in understanding vb.net I need help ..in regards with database programing I am working on an assignment . as a too i am using vb.net and microsoft access. Please advise me how to connect database created in microsoft access using vb.net
m.adil.farooq mcs & acca adil-farooq@maktoob.com