0
    If String.IsNullOrWhiteSpace(txtadmno.Text) Or String.IsNullOrWhiteSpace(txtcard.Text) Then
        MessageBox.Show("Please complete the on the box.", "Authentication Error", MessageBoxButtons.OK, MessageBoxIcon.Error)
        Exit Sub
    End If

    Using conn As New System.Data.OleDb.OleDbConnection("Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\temp\Database1.accdb")

        Dim Result As Integer

       ** Dim sql As String = "INSERT [Date Select] From tbl_studentadm values (@DateSelect) "*****in here shold i key in the admin no and admin care so that when i register in it will record in the access***

       Dim cmd As New System.Data.OleDb.OleDbCommand(sql, conn)
        Dim dtmNow As Date

        cmd.Parameters.Add("@dateselect", OleDb.OleDbType.Date).Value = DTP.Value
        conn.Open()
        dtmNow = DateValue(Now)
        Result = cmd.ExecuteNonQuery()
2
Contributors
2
Replies
8
Views
3 Years
Discussion Span
Last Post by Xiao_1
0

that no error butin this should i write the admin no and admin card so that when i register in it will record in the access

Dim sql As String = "INSERT [Date Select] From tbl_studentadm values (@DateSelect)

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.