Can you give me a sample registration module ?
Please.
Badly Need It.

Recommended Answers

All 4 Replies

Member Avatar for b1izzard
'code to insert textbox1 and textbox2 values into sample database
Dim con As New OleDb.OleDbConnection
        Dim cmd As OleDbCommand
        Dim myquery As String
        Dim transaction As OleDbTransaction
        con.ConnectionString = "your connection string"
        con.Open()
        transaction = con.BeginTransaction
        Try
            'query to insert record into Login database table schedules 
            myquery = "INSERT INTO sample VALUES('" & (texbox1.text) & _
                       "','" & (textbox2.Text) & "')"

            cmd = New OleDbCommand(myquery, con, transaction)
            cmd.ExecuteNonQuery()
            transaction.Commit()
         Catch ex As Exception
            transaction.Rollback()
            MsgBox(ex.Message, MsgBoxStyle.Critical, Me.Text)
        End Try
        transaction.Dispose()
        cmd = Nothing
        con.Close()

Thanks for the code.
How about a code for Add, Delete, Edit and Update.

Member Avatar for b1izzard

"How about a code for Add, Delete, Edit and Update"

Code it or Google it.

hi,

see my reply to your other post....

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.