Question No Value given for One or more required parameters !!Urgent Help Needed

Vaibhav Chauhan

New member
Joined
Dec 2, 2011
Messages
1
Programming Experience
Beginner
Hello to all of you guys, I am facing following problem I would really appreciate if you guys could help me to figure out what is the problem

Thanks in advance
:)



No Value given for One or more required parameters
BackEnd Access 2010
Front End VB.Net 2010
Source Code
=================================================

Public Class Form2


Private Sub TblOrganizationBindingNavigatorSaveItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TblOrganizationBindingNavigatorSaveItem.Click
Me.Validate()
Me.TblOrganizationBindingSource.EndEdit()
Me.TableAdapterManager.UpdateAll(Me.AGC_112911DataSet)


End Sub


Private Sub Form2_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
'TODO: This line of code loads data into the 'AGC_112911DataSet.tblOrganization' table. You can move, or remove it, as needed.
Me.TblOrganizationTableAdapter.Fill(Me.AGC_112911DataSet.tblOrganization)


End Sub


Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim con As New OleDb.OleDbConnection
Dim dbprovider As String
Dim dbsource As String
Dim sql As String
Dim da As OleDb.OleDbDataAdapter
Dim ds As New DataSet


dbprovider = "Provider=Microsoft.ACE.OLEDB.12.0;"
dbsource = "Data Source = C:\Users\Jason\Dropbox\School\Database Design\Project-DB\AGC\AGC/AGC_112911.accdb"
con.ConnectionString = dbprovider & dbsource
con.Open()
MsgBox("Database is now open")


'fill the Form
sql = "Select * from tblOrganization"
da = New OleDb.OleDbDataAdapter(sql, con)
Dim cb As New OleDb.OleDbCommandBuilder(da)
da.Fill(ds, "AGC_112911")


'capture the form's text controls
ds.Tables("AGC_112911").Rows(0).Item(0) = CInt(ORGANIZATION_IDTextBox.Text)
ds.Tables("AGC_112911").Rows(0).Item(1) = CStr(Organization_NameTextBox.Text)
ds.Tables("AGC_112911").Rows(0).Item(2) = CStr(WEBSITETextBox.Text)
ds.Tables("AGC_112911").Rows(0).Item(3) = CStr(EmailTextBox.Text)
ds.Tables("AGC_112911").Rows(0).Item(4) = CInt(Categroy_IDListBox.SelectedItem)


da.Update(ds, "AGC_112911") //Program Crashes here//


con.Close()
MsgBox("Database is now close")
MsgBox("Data updated!!!!")




End Sub
End Class
 

niceastham

Member
Joined
Mar 18, 2011
Messages
11
Programming Experience
1-3
Have you checked that you are passing all the required parameters to the update statement? Double check the number of items in teh select statement with the number you are passing to the update.
 
Top Bottom