0% found this document useful (0 votes)
148 views2 pages

Access Database Bill Management Code

This document defines a class in VB.NET that connects to an Access database, retrieves data from a "bill" table, and displays it in text boxes and list boxes on a form. On form load, it connects to the database, fills a dataset with the "bill" table data, and displays the first record. When the text box value changes, it finds the matching record in the dataset and displays fields from it in other controls.

Uploaded by

arunkn4480
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
148 views2 pages

Access Database Bill Management Code

This document defines a class in VB.NET that connects to an Access database, retrieves data from a "bill" table, and displays it in text boxes and list boxes on a form. On form load, it connects to the database, fills a dataset with the "bill" table data, and displays the first record. When the text box value changes, it finds the matching record in the dataset and displays fields from it in other controls.

Uploaded by

arunkn4480
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd

Imports [Link].

OleDb
Imports [Link]
Public Class Form5
Dim dte As New DataSet
Dim ddt As New OleDbDataAdapter
Dim con As New OleDbConnection
Dim i As Integer = 0
Public Sub dis()
Try
con = New OleDbConnection("Provider=[Link].4.0;Data
Source=C:\Documents and Settings\Arun\My Documents\[Link]")
[Link]()
ddt = New [Link]("select * from bill", con)
dte = New DataSet
[Link](dte)
Catch ex As Exception
MsgBox("error1")
MsgBox([Link])
End Try
End Sub
Private Sub LinkLabel1_LinkClicked(ByVal sender As [Link], ByVal e
As [Link]) Handles
[Link]
[Link]()
End Sub

Private Sub Form5_Load(ByVal sender As [Link], ByVal e As


[Link]) Handles [Link]
Call dis()
[Link] = [Link](0).Rows(i)(0)
[Link] = True
[Link] = ""
End Sub

Private Sub Timer1_Tick(ByVal sender As [Link], ByVal e As


[Link]) Handles [Link]
[Link] = [Link]
End Sub

Private Sub LinkLabel2_LinkClicked(ByVal sender As [Link], ByVal e


As [Link]) Handles
[Link]

End Sub

Private Sub Button2_Click(ByVal sender As [Link], ByVal e As


[Link]) Handles [Link]

End Sub

Private Sub TextBox1_TabIndexChanged(ByVal sender As Object, ByVal e As


[Link]) Handles [Link]
Try
[Link](0).PrimaryKey = New DataColumn()
{[Link](0).Columns("cod")}
Dim row As DataRow
row = [Link](0).[Link]([Link])
[Link] = row("cod")
[Link] = row("nam")
[Link] = row("prc")
Catch ex As Exception
MsgBox([Link]())
End Try
End Sub
End Class

You might also like