A Example for OLE DB I Compiled. Put back together for fun maybe.

Someone convert this to ASP.Net plz with a splash screen.
Required Materials
  1. a vb.net compiler(visual studio vb.net express perhaps?)
  2. Libzplay dll(your search engine will help)

    Imports System.Data
    Imports ESO.libZPlay
    Imports System.Data.OleDb
    Imports System.Drawing
    Imports System.Configuration
    Imports ESO.Class2
    Imports ESO.Module1
    Imports System.Threading
    Public Class Form1
        Private player As New ZPlay
        Private Inc As Integer
        Dim drag As Boolean
        Dim mousex As Integer
        Dim mousey As Integer
        Friend Const ConnectionString As String = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=Resources\Database4.mdb"
        Friend con As OleDbConnection = New OleDbConnection( _
                             "Provider=Microsoft.jet.oledb.4.0;data source=Resources/Database4.mdb")
        Dim e As System.Windows.Forms.KeyPressEventArgs
    
        Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
            Me.LogindetailsTableAdapter.Fill(Me.Database4DataSet11.logindetails)
            Button1.TabStop = False
            Button1.FlatStyle = FlatStyle.Flat
            Button1.FlatAppearance.BorderSize = 0
            Button1.FlatAppearance.BorderColor = Color.White
            Button1.FlatAppearance.CheckedBackColor = Color.White
            Button1.FlatAppearance.MouseDownBackColor = Color.White
            Button1.FlatAppearance.MouseOverBackColor = Color.White
            Button2.TabStop = False
            Button2.FlatStyle = FlatStyle.Flat
            Button2.FlatAppearance.BorderSize = 0
            Button2.FlatAppearance.BorderColor = Color.White
            Button2.FlatAppearance.CheckedBackColor = Color.White
            Button2.FlatAppearance.MouseDownBackColor = Color.White
            Button2.FlatAppearance.MouseOverBackColor = Color.White
            player.OpenFile("Resources\CPKff2prelude.ogg", TStreamFormat.sfAutodetect)
            player.StartPlayback()
            Dim startpos As New TStreamTime()
            Dim endpos As New TStreamTime()
            player.GetPosition(startpos)
            endpos.sec = CType(startpos.sec + 174, UInteger)
            player.PlayLoop(TTimeFormat.tfSecond, startpos, TTimeFormat.tfSecond, endpos, 99, True)
            DataGridShow()
            BackgroundImage = My.Resources.ads
            Label211()
        End Sub
    
        Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
            Button1.Image = My.Resources.buttonclick
            player.StopPlayback()
        End Sub
    
        Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
            Button2.Image = My.Resources.buttonclick
            player.StartPlayback()
            Dim startpos As New TStreamTime()
            Dim endpos As New TStreamTime()
            player.GetPosition(startpos)
            endpos.sec = CType(startpos.sec + 135, UInteger)
            player.PlayLoop(TTimeFormat.tfSecond, startpos, TTimeFormat.tfSecond, endpos, 99, True)
        End Sub
    
        Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)
    
    
        End Sub
    
        Private Sub Button1_MouseHover(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button1.MouseHover
            Button1.Image = My.Resources.buttonhover
        End Sub
    
        Private Sub Button1_MouseLeave(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button1.MouseLeave
            Button1.Image = My.Resources.button
        End Sub
    
        Private Sub Button2_MouseHover(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button2.MouseHover
            Button2.Image = My.Resources.buttonhover
        End Sub
    
        Private Sub Button2_MouseLeave(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button2.MouseLeave
            Button2.Image = My.Resources.button
        End Sub
    
        Private Sub Button3_MouseHover(ByVal sender As Object, ByVal e As System.EventArgs)
    
        End Sub
    
        Private Sub Button3_MouseLeave(ByVal sender As Object, ByVal e As System.EventArgs)
    
        End Sub
    
        Private Sub TextBox2_KeyDown(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles TextBox2.KeyDown
    
    
        End Sub
    
        Private Sub TextBox3_KeyDown(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles TextBox3.KeyDown
    
        End Sub
    
        Private Sub TextBox3_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TextBox3.TextChanged
    
        End Sub
    
        Private Sub Label3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Label3.Click
            NotifyIcon1.Visible = False
            Me.Close()
        End Sub
    
        Private Sub Form1_MouseDown(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles Me.MouseDown
            drag = True
            mousex = Windows.Forms.Cursor.Position.X - Me.Left
            mousey = Windows.Forms.Cursor.Position.Y - Me.Top
        End Sub
    
        Private Sub Form1_MouseMove(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles Me.MouseMove
            If drag Then
                Me.Top = Windows.Forms.Cursor.Position.Y - mousey
                Me.Left = Windows.Forms.Cursor.Position.X - mousex
            End If
        End Sub
    
        Private Sub Form1_MouseUp(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles Me.MouseUp
            drag = False
        End Sub
    
        Private Sub Button4_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)
            Dim con As OleDbConnection = New OleDbConnection( _
                             "Provider=Microsoft.jet.oledb.4.0;data source=Resources/Database4.mdb")
            con.Open()
            Dim cmdText As String = "INSERT INTO logindetails(HeroName, [HeroPassword]) VALUES (?,?)"
            Dim cmd As OleDbCommand = New OleDbCommand(cmdText, con)
            cmd.CommandType = CommandType.Text ' The default is CommandType.Text
            With cmd.Parameters
                .Add("@p1", OleDbType.VarChar).Value = TextBox2.Text
                .Add("@p2", OleDbType.VarChar).Value = TextBox3.Text
            End With
            cmd.ExecuteNonQuery()
            con.Close()
            con = Nothing
        End Sub
    
        Private Sub Label4_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Label4.Click
            Dim ds As New DataSet
            Dim dt As New DataTable
            ds.Tables.Add(dt)
            Dim da As New OleDbDataAdapter
    
            da = New OleDbDataAdapter("Select * From logindetails", ConnectionString)
    
            da.Fill(ds, "logindetails")
    
            If ds Is Nothing Then
                Return
            End If
    
            Dim MyNumber As Integer = 1
            Try
                con.Open()
            Catch ex As Exception
                MsgBox(ex.Message())
            End Try
    
            Dim cmdText As String = "INSERT INTO logindetails(HeroName, [HeroPassword]) VALUES (?,?); "
    
            Dim cmd As OleDbCommand = New OleDbCommand(cmdText, con)
            cmd.CommandType = CommandType.Text ' The default is CommandType.Text
            cmd.Parameters.Add("?", OleDbType.VarChar).Value = TextBox2.Text
            cmd.Parameters.Add("?", OleDbType.VarChar).Value = TextBox3.Text
    
    
    
            Dim command As New OleDbCommand("SELECT [ID] FROM [logindetails] WHERE [HeroName] = @username AND [HeroPassword] = @password", con)
    
            command.Parameters.Add("@username", OleDbType.VarChar).Value = TextBox2.Text
            command.Parameters.Add("@password", OleDbType.VarChar).Value = TextBox3.Text
    
    
            Dim reader As OleDbDataReader = command.ExecuteReader()
            Try
                If reader.HasRows Then
                    Dim command1 As New OleDbCommand("COUNT [ID],[HeroName],[HeroPassword] FROM [logindetails] IF COUNT = 50 Then")
                    MessageBox.Show("Maximum Save Slots Reached", "A Digital Whirlwind", MessageBoxButtons.OK, MessageBoxIcon.Exclamation)
                    Exit Sub
                Else
    
                    MessageBox.Show("You have 3 Character Slots", "A Digital Whirlwind", MessageBoxButtons.OK, MessageBoxIcon.Exclamation)
                End If
            Catch ex As Exception
                MsgBox(ex.Message())
            End Try
    
            Try
                MyNumber = cmd.ExecuteNonQuery
                If Not MyNumber = 0 Then
    
                    MessageBox.Show("Data has been entered you may now login.", "A Digital Whirlwind", MessageBoxButtons.OK, MessageBoxIcon.Information)
                    Return
                ElseIf MyNumber = 1 Then
                    MessageBox.Show("Data Entry Failed!", "A Digital Whirlwind", MessageBoxButtons.OK, MessageBoxIcon.Information)
    
                End If
    
            Catch ex As Exception
                MsgBox(ex.Message())
            End Try
    
            con.Close()
    
            If RadioButton1.Checked Then
                ds.Tables("logindetails").Rows(0).Item(1) = TextBox1.Text
                ds.Tables("logindetails").Rows(0).Item(2) = TextBox3.Text
                MsgBox("Data Set Updated")
    
                Dim cb As New OleDb.OleDbCommandBuilder(da)
    
                ds.Tables("logindetails").Rows(0).Item(1) = TextBox2.Text
                ds.Tables("logindetails").Rows(0).Item(2) = TextBox3.Text
    
                da.Update(ds, "logindetails")
    
                MsgBox("Database Updated")
            End If
            If RadioButton2.Checked Then
                ds.Tables("logindetails").Rows(1).Item(1) = TextBox2.Text
                ds.Tables("logindetails").Rows(1).Item(2) = TextBox3.Text
                MsgBox("Data Set Updated")
    
                Dim cb As New OleDb.OleDbCommandBuilder(da)
    
                ds.Tables("logindetails").Rows(1).Item(1) = TextBox2.Text
                ds.Tables("logindetails").Rows(1).Item(2) = TextBox3.Text
    
                da.Update(ds, "logindetails")
    
                MsgBox("Database Updated")
            End If
            If RadioButton3.Checked Then
                ds.Tables("logindetails").Rows(2).Item(1) = TextBox2.Text
                ds.Tables("logindetails").Rows(2).Item(2) = TextBox3.Text
                MsgBox("Data Set Updated")
    
                Dim cb As New OleDb.OleDbCommandBuilder(da)
    
                ds.Tables("logindetails").Rows(2).Item(1) = TextBox2.Text
                ds.Tables("logindetails").Rows(2).Item(2) = TextBox3.Text
    
                da.Update(ds, "logindetails")
    
                MsgBox("Database Updated")
            End If
    
        End Sub
    
        Private Sub Label5_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Label5.Click
            player.StopPlayback()
            Dim LoginForm1 As New LoginForm1
            LoginForm1.Show()
        End Sub
    
        Private Sub Label4_MouseHover(ByVal sender As Object, ByVal e As System.EventArgs) Handles Label4.MouseHover
            Label4.Image = My.Resources.button
            My.Computer.Audio.Play("Resources\50561__broumbroum__sf3-sfx-menu-select.wav", AudioPlayMode.WaitToComplete)
        End Sub
    
        Private Sub Label4_MouseLeave(ByVal sender As Object, ByVal e As System.EventArgs) Handles Label4.MouseLeave
            Label4.Image = Nothing
        End Sub
    
        Private Sub Label5_MouseHover(ByVal sender As Object, ByVal e As System.EventArgs) Handles Label5.MouseHover
            Label5.Image = My.Resources.button
            My.Computer.Audio.Play("Resources\50561__broumbroum__sf3-sfx-menu-select.wav", AudioPlayMode.WaitToComplete)
        End Sub
    
        Private Sub Label5_MouseLeave(ByVal sender As Object, ByVal e As System.EventArgs) Handles Label5.MouseLeave
            Label5.Image = Nothing
        End Sub
    
        Private Sub ContextMenuStrip1_Opening(ByVal sender As System.Object, ByVal e As System.ComponentModel.CancelEventArgs)
    
        End Sub
    
        Private Sub ToolStripMenuItem1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ToolStripMenuItem1.Click
            NotifyIcon1.Visible = False
            Me.Close()
        End Sub
    
        Private Sub Label3_MouseHover(ByVal sender As Object, ByVal e As System.EventArgs) Handles Label3.MouseHover
            Label3.Image = My.Resources.button
            My.Computer.Audio.Play("Resources\50561__broumbroum__sf3-sfx-menu-select.wav", AudioPlayMode.WaitToComplete)
        End Sub
    
        Private Sub Label3_MouseLeave(ByVal sender As Object, ByVal e As System.EventArgs) Handles Label3.MouseLeave
            Label3.Image = Nothing
        End Sub
    
        Private Sub TextBox1_KeyDown(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles TextBox1.KeyDown
            If Keys.Enter Then
                If TextBox1.Text = "Hello" Then
                    TextBox1.Text = "Salutations"
                End If
                If Keys.Enter Then
                    If TextBox1.Text = "-Close" Then
                        Me.Close()
                    End If
                    If TextBox1.Text = "-Save" Then
                        Dim MyNumber As Integer = 1
                        Dim con As OleDbConnection = New OleDbConnection( _
                                         "Provider=Microsoft.jet.oledb.4.0;data source=Resources/Database4.mdb")
                        con.Open()
                        Dim cmdText As String = "INSERT INTO logindetails(HeroName, [HeroPassword]) VALUES (?,?); "
    
                        Dim cmd As OleDbCommand = New OleDbCommand(cmdText, con)
                        cmd.CommandType = CommandType.Text ' The default is CommandType.Text
                        cmd.Parameters.Add("?", OleDbType.VarChar).Value = TextBox2.Text
                        cmd.Parameters.Add("?", OleDbType.VarChar).Value = TextBox3.Text
    
                        Dim command As New OleDbCommand("SELECT [ID] FROM [logindetails] WHERE [HeroName] = @username AND [HeroPassword] = @password", con)
    
                        command.Parameters.Add("@username", OleDbType.VarChar).Value = TextBox2.Text
                        command.Parameters.Add("@password", OleDbType.VarChar).Value = TextBox3.Text
    
    
                        Dim reader As OleDbDataReader = command.ExecuteReader()
                        Try
                            If reader.HasRows Then
                                Dim command1 As New OleDbCommand("COUNT [ID],[HeroName],[HeroPassword] FROM [logindetails] IF COUNT = 100")
                                MessageBox.Show("Maximum Save Slots Reached", "A Digital Whirlwind", MessageBoxButtons.OK, MessageBoxIcon.Exclamation)
                                Exit Sub
                            Else
    
                                MessageBox.Show("You have 3 Character Slots", "A Digital Whirlwind", MessageBoxButtons.OK, MessageBoxIcon.Exclamation)
                            End If
                        Catch ex As Exception
                            MsgBox(ex.Message())
                        End Try
    
                        Try
                            MyNumber = cmd.ExecuteNonQuery
                            If Not MyNumber = 0 Then
    
                                MessageBox.Show("Data has been entered you may now login.", "A Digital Whirlwind", MessageBoxButtons.OK, MessageBoxIcon.Information)
                                Return
                            ElseIf MyNumber = 1 Then
                                MessageBox.Show("Data Entry Failed!", "A Digital Whirlwind", MessageBoxButtons.OK, MessageBoxIcon.Information)
    
                            End If
    
                        Catch ex As Exception
                            MsgBox(ex.Message())
                        End Try
    
                        con.Close()
    
                    End If
                End If
            End If
            If Keys.Enter Then
                If TextBox1.Text = "-Update" Then
                    Dim ds As New DataSet
                    Dim dt As New DataTable
                    ds.Tables.Add(dt)
                    Dim da As New OleDbDataAdapter
    
                    da = New OleDbDataAdapter("Select * From logindetails", ConnectionString)
    
                    da.Fill(ds, "logindetails")
    
                    If ds Is Nothing Then
                        Return
                    End If
    
                    'construct the command object and open a connection to the Contacts table
                    Dim cmdString As String = "Select ID, HeroName, HeroPassword from logindetails"
                    Dim connString As String = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=Resources/Database4.mdb"
                    Dim myConnection As OleDbConnection = New OleDbConnection(connString)
                    ' Open connection
                    myConnection.Open()
                    'Create OleDbCommand object
                    Dim TheCommand As OleDbCommand = New OleDbCommand(cmdString, myConnection)
                    TheCommand.CommandType = CommandType.Text
                    ' Create a DataReader and call Execute on the Command Object to construct it
                    Dim TheDataReader As OleDbDataReader = TheCommand.ExecuteReader()
    
                    Try
                        While TheDataReader.Read()
                            Label22.Text = ds.Tables("logindetails").Rows(0).Item(1)
                            Label23.Text = ds.Tables("logindetails").Rows(0).Item(2)
                            Label25.Text = ds.Tables("logindetails").Rows(1).Item(1)
                            Label24.Text = ds.Tables("logindetails").Rows(1).Item(2)
                            Label27.Text = ds.Tables("logindetails").Rows(2).Item(2)
                            Label26.Text = ds.Tables("logindetails").Rows(2).Item(1)
                        End While
                    Catch ae As OleDbException
                        MsgBox(ae.Message())
                    Catch ex As Exception
                        MsgBox(ex.Message())
                    Finally
                        TheDataReader.Close()
                    End Try
    
                    If RadioButton1.Checked Then
                        ds.Tables("logindetails").Rows(0).Item(1) = ds.Tables("logindetails").Rows(0).Item(1)
                        ds.Tables("logindetails").Rows(0).Item(2) = ds.Tables("logindetails").Rows(0).Item(2)
                        MsgBox("Data Set Updated")
    
                        Dim cb As New OleDb.OleDbCommandBuilder(da)
    
                        ds.Tables("logindetails").Rows(0).Item(1) = ds.Tables("logindetails").Rows(0).Item(1)
                        ds.Tables("logindetails").Rows(0).Item(2) = ds.Tables("logindetails").Rows(0).Item(2)
    
                        da.Update(ds, "logindetails")
    
                        MsgBox("Database Updated")
                    End If
                    If RadioButton2.Checked Then
                        ds.Tables("logindetails").Rows(1).Item(1) = ds.Tables("logindetails").Rows(1).Item(1)
                        ds.Tables("logindetails").Rows(1).Item(2) = ds.Tables("logindetails").Rows(1).Item(2)
                        MsgBox("Data Set Updated")
    
                        Dim cb As New OleDb.OleDbCommandBuilder(da)
    
                        ds.Tables("logindetails").Rows(1).Item(1) = ds.Tables("logindetails").Rows(1).Item(1)
                        ds.Tables("logindetails").Rows(1).Item(2) = ds.Tables("logindetails").Rows(1).Item(2)
    
                        da.Update(ds, "logindetails")
    
                        MsgBox("Database Updated")
                    End If
                    If RadioButton3.Checked Then
                        ds.Tables("logindetails").Rows(2).Item(1) = ds.Tables("logindetails").Rows(2).Item(2)
                        ds.Tables("logindetails").Rows(2).Item(2) = ds.Tables("logindetails").Rows(2).Item(1)
                        MsgBox("Data Set Updated")
    
                        Dim cb As New OleDb.OleDbCommandBuilder(da)
    
                        ds.Tables("logindetails").Rows(2).Item(1) = ds.Tables("logindetails").Rows(2).Item(2)
                        ds.Tables("logindetails").Rows(2).Item(2) = ds.Tables("logindetails").Rows(2).Item(1)
    
                        da.Update(ds, "logindetails")
    
                        MsgBox("Database Updated")
                    End If
    
                End If
            End If
            If Keys.Enter Then
                If TextBox1.Text = "-Delete" Then
                    Dim ds As New DataSet
                    Dim dt As New DataTable
                    ds.Tables.Add(dt)
                    Dim da As New OleDbDataAdapter
    
                    da = New OleDbDataAdapter("Select * From logindetails", ConnectionString)
    
                    da.Fill(ds, "logindetails")
    
                    If ds Is Nothing Then
                        Return
                    End If
                    Dim command As New OleDbCommand("DELETE [ID],[HeroName],[HeroPassword] FROM [logindetails] WHERE [HeroName] = @username AND [HeroPassword] = @password", con)
    
                    command.Parameters.Add("@username", OleDbType.VarChar).Value = TextBox2.Text
                    command.Parameters.Add("@password", OleDbType.VarChar).Value = TextBox3.Text
    
                    If RadioButton1.Checked Then
                        ds.Tables("logindetails").Rows(0).Item(1) = TextBox2.Text
                        ds.Tables("logindetails").Rows(0).Item(2) = TextBox3.Text
                        MsgBox("Data Set Updated")
    
                        Dim cb As New OleDb.OleDbCommandBuilder(da)
    
                        ds.Tables("logindetails").Rows(0).Item(1) = TextBox2.Text
                        ds.Tables("logindetails").Rows(0).Item(2) = TextBox3.Text
    
                        da.Update(ds, "logindetails")
    
                        MsgBox("Database Updated")
                    End If
                    If RadioButton2.Checked Then
                        ds.Tables("logindetails").Rows(1).Item(1) = TextBox2.Text
                        ds.Tables("logindetails").Rows(1).Item(2) = TextBox3.Text
                        MsgBox("Data Set Updated")
    
                        Dim cb As New OleDb.OleDbCommandBuilder(da)
    
                        ds.Tables("logindetails").Rows(1).Item(1) = TextBox2.Text
                        ds.Tables("logindetails").Rows(1).Item(2) = TextBox3.Text
    
                        da.Update(ds, "logindetails")
    
                        MsgBox("Database Updated")
                    End If
                    If RadioButton3.Checked Then
                        ds.Tables("logindetails").Rows(2).Item(1) = TextBox2.Text
                        ds.Tables("logindetails").Rows(2).Item(2) = TextBox3.Text
                        MsgBox("Data Set Updated")
    
                        Dim cb As New OleDb.OleDbCommandBuilder(da)
    
                        ds.Tables("logindetails").Rows(2).Item(1) = TextBox2.Text
                        ds.Tables("logindetails").Rows(2).Item(2) = TextBox3.Text
    
                        da.Update(ds, "logindetails")
    
                        MsgBox("Database Updated")
                    End If
    
                End If
            End If
    
    
        End Sub
    
        Private Sub TextBox1_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles TextBox1.KeyPress
            ESO.Module1.test1()
        End Sub
    
        Private Sub TextBox1_KeyUp(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles TextBox1.KeyUp
            If Keys.Enter Then
    
            End If
        End Sub
    
        Private Sub TextBox1_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TextBox1.TextChanged
    
        End Sub
    
        Private Sub Label7_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Label7.Click
            Dim ds As New DataSet
            Dim dt As New DataTable
            ds.Tables.Add(dt)
            Dim da As New OleDbDataAdapter
    
            da = New OleDbDataAdapter("Select * From logindetails", ConnectionString)
    
            da.Fill(ds, "logindetails")
    
            If ds Is Nothing Then
                Return
            End If
    
            'construct the command object and open a connection to the Contacts table
            Dim cmdString As String = "Select ID, HeroName, HeroPassword from logindetails"
            Dim connString As String = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=Resources/Database4.mdb"
            Dim myConnection As OleDbConnection = New OleDbConnection(connString)
            ' Open connection
            myConnection.Open()
            'Create OleDbCommand object
            Dim TheCommand As OleDbCommand = New OleDbCommand(cmdString, myConnection)
            TheCommand.CommandType = CommandType.Text
            ' Create a DataReader and call Execute on the Command Object to construct it
            Dim TheDataReader As OleDbDataReader = TheCommand.ExecuteReader()
    
            Try
                While TheDataReader.Read()
                    Label22.Text = ds.Tables("logindetails").Rows(0).Item(1)
                    Label23.Text = ds.Tables("logindetails").Rows(0).Item(2)
                    Label25.Text = ds.Tables("logindetails").Rows(1).Item(1)
                    Label24.Text = ds.Tables("logindetails").Rows(1).Item(2)
                    Label27.Text = ds.Tables("logindetails").Rows(2).Item(2)
                    Label26.Text = ds.Tables("logindetails").Rows(2).Item(1)
                End While
            Catch ae As OleDbException
                MsgBox(ae.Message())
            Catch ex As Exception
                MsgBox(ex.Message())
            Finally
                TheDataReader.Close()
            End Try
    
            If RadioButton1.Checked Then
                ds.Tables("logindetails").Rows(0).Item(1) = ds.Tables("logindetails").Rows(0).Item(1)
                ds.Tables("logindetails").Rows(0).Item(2) = ds.Tables("logindetails").Rows(0).Item(2)
                MsgBox("Data Set Updated")
    
                Dim cb As New OleDb.OleDbCommandBuilder(da)
    
                ds.Tables("logindetails").Rows(0).Item(1) = ds.Tables("logindetails").Rows(0).Item(1)
                ds.Tables("logindetails").Rows(0).Item(2) = ds.Tables("logindetails").Rows(0).Item(2)
    
                da.Update(ds, "logindetails")
    
                MsgBox("Database Updated")
            End If
            If RadioButton2.Checked Then
                ds.Tables("logindetails").Rows(1).Item(1) = ds.Tables("logindetails").Rows(1).Item(1)
                ds.Tables("logindetails").Rows(1).Item(2) = ds.Tables("logindetails").Rows(1).Item(2)
                MsgBox("Data Set Updated")
    
                Dim cb As New OleDb.OleDbCommandBuilder(da)
    
                ds.Tables("logindetails").Rows(1).Item(1) = ds.Tables("logindetails").Rows(1).Item(1)
                ds.Tables("logindetails").Rows(1).Item(2) = ds.Tables("logindetails").Rows(1).Item(2)
    
                da.Update(ds, "logindetails")
    
                MsgBox("Database Updated")
            End If
            If RadioButton3.Checked Then
                ds.Tables("logindetails").Rows(2).Item(1) = ds.Tables("logindetails").Rows(2).Item(2)
                ds.Tables("logindetails").Rows(2).Item(2) = ds.Tables("logindetails").Rows(2).Item(1)
                MsgBox("Data Set Updated")
    
                Dim cb As New OleDb.OleDbCommandBuilder(da)
    
                ds.Tables("logindetails").Rows(2).Item(1) = ds.Tables("logindetails").Rows(2).Item(2)
                ds.Tables("logindetails").Rows(2).Item(2) = ds.Tables("logindetails").Rows(2).Item(1)
    
                da.Update(ds, "logindetails")
    
                MsgBox("Database Updated")
            End If
    
        End Sub
        Private Sub DataGridShow()
            Dim ds As New DataSet
            Dim dt As New DataTable
            ds.Tables.Add(dt)
            Dim da As New OleDbDataAdapter
    
            da = New OleDbDataAdapter("Select * From logindetails", ConnectionString)
    
            da.Fill(ds, "logindetails")
    
            If ds Is Nothing Then
                Return
            End If
    
            'construct the command object and open a connection to the Contacts table
            Dim cmdString As String = "Select ID, HeroName, HeroPassword from logindetails"
            Dim connString As String = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=Resources/Database4.mdb"
            Dim myConnection As OleDbConnection = New OleDbConnection(connString)
            ' Open connection
            myConnection.Open()
            'Create OleDbCommand object
            Dim TheCommand As OleDbCommand = New OleDbCommand(cmdString, myConnection)
            TheCommand.CommandType = CommandType.Text
            ' Create a DataReader and call Execute on the Command Object to construct it
            Dim TheDataReader As OleDbDataReader = TheCommand.ExecuteReader()
    
            Try
                While TheDataReader.Read()
                    Label22.Text = ds.Tables("logindetails").Rows(0).Item(1)
                    Label23.Text = ds.Tables("logindetails").Rows(0).Item(2)
                    Label25.Text = ds.Tables("logindetails").Rows(1).Item(1)
                    Label24.Text = ds.Tables("logindetails").Rows(1).Item(2)
                    Label27.Text = ds.Tables("logindetails").Rows(2).Item(2)
                    Label26.Text = ds.Tables("logindetails").Rows(2).Item(1)
                End While
            Catch ae As OleDbException
                MsgBox(ae.Message())
            Catch ex As Exception
                MsgBox(ex.Message())
            Finally
                TheDataReader.Close()
            End Try
    
            If RadioButton1.Checked Then
                ds.Tables("logindetails").Rows(0).Item(1) = TextBox2.Text
                ds.Tables("logindetails").Rows(0).Item(2) = TextBox3.Text
                MsgBox("Data Set Updated")
    
                Dim cb As New OleDb.OleDbCommandBuilder(da)
    
                ds.Tables("logindetails").Rows(0).Item(1) = TextBox2.Text
                ds.Tables("logindetails").Rows(0).Item(2) = TextBox3.Text
    
                da.Update(ds, "logindetails")
    
                MsgBox("Database Updated")
            End If
            If RadioButton2.Checked Then
                ds.Tables("logindetails").Rows(1).Item(1) = TextBox2.Text
                ds.Tables("logindetails").Rows(1).Item(2) = TextBox3.Text
                MsgBox("Data Set Updated")
    
                Dim cb As New OleDb.OleDbCommandBuilder(da)
    
                ds.Tables("logindetails").Rows(1).Item(1) = TextBox2.Text
                ds.Tables("logindetails").Rows(1).Item(2) = TextBox3.Text
    
                da.Update(ds, "logindetails")
    
                MsgBox("Database Updated")
            End If
            If RadioButton3.Checked Then
                ds.Tables("logindetails").Rows(2).Item(1) = TextBox2.Text
                ds.Tables("logindetails").Rows(2).Item(2) = TextBox3.Text
                MsgBox("Data Set Updated")
    
                Dim cb As New OleDb.OleDbCommandBuilder(da)
    
                ds.Tables("logindetails").Rows(2).Item(1) = TextBox2.Text
                ds.Tables("logindetails").Rows(2).Item(2) = TextBox3.Text
    
                da.Update(ds, "logindetails")
    
                MsgBox("Database Updated")
            End If
    
        End Sub
    
        Private Sub Label7_MouseHover(ByVal sender As Object, ByVal e As System.EventArgs) Handles Label7.MouseHover
            Label7.Image = My.Resources.button
            My.Computer.Audio.Play("Resources\50561__broumbroum__sf3-sfx-menu-select.wav", AudioPlayMode.WaitToComplete)
        End Sub
    
        Private Sub Label7_MouseLeave(ByVal sender As Object, ByVal e As System.EventArgs) Handles Label7.MouseLeave
            Label7.Image = Nothing
        End Sub
    
        Private Sub Label17_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Label17.Click
            Dim ds As New DataSet
            Dim dt As New DataTable
            ds.Tables.Add(dt)
            Dim da As New OleDbDataAdapter
    
            da = New OleDbDataAdapter("Select * From logindetails", ConnectionString)
    
            da.Fill(ds, "logindetails")
    
            If ds Is Nothing Then
                Return
            End If
            Dim command As New OleDbCommand("DELETE [ID],[HeroName],[HeroPassword] FROM [logindetails] WHERE [HeroName] = @username AND [HeroPassword] = @password", con)
    
            command.Parameters.Add("@username", OleDbType.VarChar).Value = TextBox2.Text
            command.Parameters.Add("@password", OleDbType.VarChar).Value = TextBox3.Text
    
            If RadioButton1.Checked Then
                ds.Tables("logindetails").Rows(0).Item(1) = TextBox2.Text
                ds.Tables("logindetails").Rows(0).Item(2) = TextBox3.Text
                MsgBox("Data Set Updated")
    
                Dim cb As New OleDb.OleDbCommandBuilder(da)
    
                ds.Tables("logindetails").Rows(0).Item(1) = TextBox2.Text
                ds.Tables("logindetails").Rows(0).Item(2) = TextBox3.Text
    
                da.Update(ds, "logindetails")
    
                MsgBox("Database Updated")
            End If
            If RadioButton2.Checked Then
                ds.Tables("logindetails").Rows(1).Item(1) = TextBox2.Text
                ds.Tables("logindetails").Rows(1).Item(2) = TextBox3.Text
                MsgBox("Data Set Updated")
    
                Dim cb As New OleDb.OleDbCommandBuilder(da)
    
                ds.Tables("logindetails").Rows(1).Item(1) = TextBox2.Text
                ds.Tables("logindetails").Rows(1).Item(2) = TextBox3.Text
    
                da.Update(ds, "logindetails")
    
                MsgBox("Database Updated")
            End If
            If RadioButton3.Checked Then
                ds.Tables("logindetails").Rows(2).Item(1) = TextBox2.Text
                ds.Tables("logindetails").Rows(2).Item(2) = TextBox3.Text
                MsgBox("Data Set Updated")
    
                Dim cb As New OleDb.OleDbCommandBuilder(da)
    
                ds.Tables("logindetails").Rows(2).Item(1) = TextBox2.Text
                ds.Tables("logindetails").Rows(2).Item(2) = TextBox3.Text
    
                da.Update(ds, "logindetails")
    
                MsgBox("Database Updated")
            End If
    
        End Sub
    
        Private Sub Label17_MouseEnter(ByVal sender As Object, ByVal e As System.EventArgs) Handles Label17.MouseEnter
    
        End Sub
    
        Private Sub Label17_MouseHover(ByVal sender As Object, ByVal e As System.EventArgs) Handles Label17.MouseHover
            Label17.Image = My.Resources.button
            My.Computer.Audio.Play("Resources\50561__broumbroum__sf3-sfx-menu-select.wav", AudioPlayMode.WaitToComplete)
        End Sub
    
        Private Sub Label17_MouseLeave(ByVal sender As Object, ByVal e As System.EventArgs) Handles Label17.MouseLeave
            Label17.Image = Nothing
        End Sub
    
        Private Sub Label19_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Label19.Click
            If MouseButtons.Right Then
                ContextMenuStrip1.Show()
                ContextMenuStrip1.AutoSize = True
    
            End If
        End Sub
    
        Private Sub HScrollBar1_Scroll(ByVal sender As System.Object, ByVal e As System.Windows.Forms.ScrollEventArgs) Handles HScrollBar1.Scroll
    
        End Sub
    
        Private Sub Resolution_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Resolution.Click
    
        End Sub
    
        Private Sub reso1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles reso1.Click
    
        End Sub
    
        Private Sub EnableToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles EnableToolStripMenuItem.Click
            Me.Height = 1024
            Me.Width = 1280
            GroupBox1.Location = New Point(550, 600)
            Label8.Location = New Point(570, 620)
            Label9.Location = New Point(570, 670)
            Label10.Location = New Point(780, 670)
            Label11.Location = New Point(570, 715)
            Label12.Location = New Point(570, 750)
            Label13.Location = New Point(570, 780)
            Label14.Location = New Point(780, 715)
            Label15.Location = New Point(780, 750)
            Label16.Location = New Point(780, 780)
            GroupBox2.Location = New Point(50, 600)
            Label6.Location = New Point(50, 670)
        End Sub
    
        Private Sub Label21_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Label21.Click
    
        End Sub
    
        Private Sub Label21_Disposed(sender As Object, e As System.EventArgs) Handles Label21.Disposed
    
        End Sub
    
        Private Sub Label21_MouseHover(ByVal sender As Object, ByVal e As System.EventArgs) Handles Label21.MouseHover
            Label21.Image = My.Resources.button
            My.Computer.Audio.Play("Resources\50561__broumbroum__sf3-sfx-menu-select.wav", AudioPlayMode.WaitToComplete)
        End Sub
    
        Private Sub Label21_MouseLeave(ByVal sender As Object, ByVal e As System.EventArgs) Handles Label21.MouseLeave
            Label21.Image = Nothing
        End Sub
        Private Sub Label211()
    
            If Keys.Alt + Keys.S Then
                Label21.Enabled = True
                Label21.Visible = True
            End If
    
        End Sub
    
        Private Sub DisableToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles DisableToolStripMenuItem.Click
    
        End Sub
    
        Private Sub Label20_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Label20.Click
    
        End Sub
    
        Private Sub TextBox2_TextChanged(sender As System.Object, e As System.EventArgs) Handles TextBox2.TextChanged
    
        End Sub
    
        Private Sub Label28_Click(sender As System.Object, e As System.EventArgs) Handles Label28.Click
            Dim ds As New DataSet
            Dim dt As New DataTable
            ds.Tables.Add(dt)
            Dim da As New OleDbDataAdapter
    
            da = New OleDbDataAdapter("Select * From logindetails", ConnectionString)
    
            da.Fill(ds, "logindetails")
    
            If ds Is Nothing Then
                Return
            End If
            Dim command As New OleDbCommand("DCount [ID],[HeroName],[HeroPassword] FROM [logindetails] WHERE [HeroName] = @username AND [HeroPassword] = @password", con)
    
            command.Parameters.Add("@username", OleDbType.VarChar).Value = TextBox2.Text
            command.Parameters.Add("@password", OleDbType.VarChar).Value = TextBox3.Text
    
            If RadioButton1.Checked Then
                con.Open()
                command.ExecuteNonQuery()
                TextBox1.Text = command.ExecuteNonQuery()
                command.Dispose()
                con.Close()
            End If
            If RadioButton2.Checked Then
                ds.Tables("logindetails").Rows(1).Item(1) = TextBox2.Text
                ds.Tables("logindetails").Rows(1).Item(2) = TextBox3.Text
                MsgBox("Data Set Updated")
    
                Dim cb As New OleDb.OleDbCommandBuilder(da)
    
                ds.Tables("logindetails").Rows(1).Item(1) = TextBox2.Text
                ds.Tables("logindetails").Rows(1).Item(2) = TextBox3.Text
    
                da.Update(ds, "logindetails")
    
                MsgBox("Database Updated")
            End If
            If RadioButton3.Checked Then
                ds.Tables("logindetails").Rows(2).Item(1) = TextBox2.Text
                ds.Tables("logindetails").Rows(2).Item(2) = TextBox3.Text
                MsgBox("Data Set Updated")
    
                Dim cb As New OleDb.OleDbCommandBuilder(da)
    
                ds.Tables("logindetails").Rows(2).Item(1) = TextBox2.Text
                ds.Tables("logindetails").Rows(2).Item(2) = TextBox3.Text
    
                da.Update(ds, "logindetails")
    
                MsgBox("Database Updated")
            End If
    
        End Sub
    
        Private Sub Label11_Click(sender As System.Object, e As System.EventArgs) Handles Label11.Click
    
        End Sub
    End Class
    

If this code compiled without error then please post it to code snippet section. Others may get help from this..

Right on... yes compiles without error i was trying to convert to asp.net also.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.