ms accessデータベースに日付を保存するフォームがあるので、誰でも助けてくれますか。保存ボタンをクリックすると、データが正しく保存されることがありますが、「オーバーフロー」「ExecuteNonQuery」が宣言されていないというエラーが表示されることがあります。保護レベルにより、アクセスできない場合があります。 私はこのコードを使用しています:
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
If MsgBox("Are you sure you want to Add Data?", MsgBoxStyle.Question + MsgBoxStyle.YesNo, "WARNING") = MsgBoxResult.Yes Then
Dim OleDBC As New OleDbCommand
With OleDBC
.Connection = conn
.CommandText = "Insert Into tblmaritlistBA_I (form_number,name_of_candidate,fathers_name,mothers_name,category,minority,date_of_birth,gender,mobile,address,board,passed_year,intermediate_marks_obtained,intermediate_total_marks,percentage,normalization_factor,total_percentage) VALUES ('" & txtformnumber.Text & "','" & txtstuname.Text & "','" & txtfathname.Text & "','" & txtmothname.Text & "','" & cmbcategory.Text & "','" & cmbminority.Text & "','" & dobPicker1.Text & "','" & cmbgender.Text & "','" & txtmobile.Text & "','" & txtaddress.Text & "','" & cmbboard.Text & "','" & cmbpassedyear.Text & "','" & txtintermarks.Text & "','" & txtintertotalmarks.Text & "','" & txtpercentage.Text & "','" & Lblnormalization.Text & "','" & txtpercentageafterN.Text & "')"
.ExecuteNonQuery()
End With
MsgBox("Data Added!", MsgBoxStyle.Information + MsgBoxStyle.OkOnly, "SUCCESS")
Me.Hide()
Call initgrid()
End If
End Sub
助けてください("_")