C
Cedric Robinson via .NET 247
(Type your message here)
--------------------------------
From: Cedric Robinson
Hi, I am simply trying to insert records into an access database using asp.net. I can edit and update tables all day long. But when I go to insert I get this error.
No value given for one or more required parameters.
Exception Details: System.Data.OleDb.OleDbException: No value given for one or more required parameters.
Source Error:
Line 175: Me.OleDbConnection1.Open()
Line 176: Dim strSQL As String = "INSERT INTO Action_Items(Action_Item_No, Assigned_To) VALUES (txtActionItemNo.txt, txtAssignedTo.txt)"
Line 177: Me.OleDbInsertCommand1.ExecuteNonQuery()
Line 178: Me.OleDbConnection1.Close()
Line 179:
Here is my code. Can someone point me in the right direction. Thanks (I am new at this)
Private Sub btnSubmit_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnSubmit.Click
Dim myConnection As New OleDb.OleDbConnection()
Dim ex As Exception
' myConnection.Open()
Me.OleDbConnection1.Open()
Dim strSQL As String = "INSERT INTO Action_Items(Action_Item_No, Assigned_To) VALUES (txtActionItemNo.txt, txtAssignedTo.txt)"
Me.OleDbInsertCommand1.ExecuteNonQuery()
Me.OleDbConnection1.Close()
End Sub
--------------------------------
From: Cedric Robinson
Hi, I am simply trying to insert records into an access database using asp.net. I can edit and update tables all day long. But when I go to insert I get this error.
No value given for one or more required parameters.
Exception Details: System.Data.OleDb.OleDbException: No value given for one or more required parameters.
Source Error:
Line 175: Me.OleDbConnection1.Open()
Line 176: Dim strSQL As String = "INSERT INTO Action_Items(Action_Item_No, Assigned_To) VALUES (txtActionItemNo.txt, txtAssignedTo.txt)"
Line 177: Me.OleDbInsertCommand1.ExecuteNonQuery()
Line 178: Me.OleDbConnection1.Close()
Line 179:
Here is my code. Can someone point me in the right direction. Thanks (I am new at this)
Private Sub btnSubmit_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnSubmit.Click
Dim myConnection As New OleDb.OleDbConnection()
Dim ex As Exception
' myConnection.Open()
Me.OleDbConnection1.Open()
Dim strSQL As String = "INSERT INTO Action_Items(Action_Item_No, Assigned_To) VALUES (txtActionItemNo.txt, txtAssignedTo.txt)"
Me.OleDbInsertCommand1.ExecuteNonQuery()
Me.OleDbConnection1.Close()
End Sub