Please help me on this i really need this badly...
tnx

create database test10.mdb and create a table ..name it as "table1" add columns "username" and "password"

In asp.net add two textboxes and a button

put this code in button

Imports System.Data.OleDb


Partial Class _Default
    Inherits System.Web.UI.Page
    Dim conn As OleDbConnection
    Dim cmd As OleDbCommand
    Dim i As Integer


    Protected Sub Button1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button1.Click
        conn = New OleDbConnection("Provider=Microsoft.Jet.Oledb.4.0; Data Source=c:\test10.mdb")
        conn.Open()
        Dim str As String
        str = "insert into table1 values(' " & TextBox1.Text & "',' " & TextBox2.Text & "')"
       cmd = New OleDbCommand(str, conn)


        i = cmd.ExecuteNonQuery()
        MsgBox(i)
        conn.Close()

    End Sub

    
End Class

enter the desired username and password in the two textboxes and you will find it updated in the access table

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.