vb.net - Cannot update Access database via VB 2010 -


The school is busy working on a project and we have almost completed it. The table adapter is connected to a VB2010 program to access 2010.

PROBLEM: When the program is running from Visual Studio 2010, then we will be able to update & amp; Insert the record is OK but when I create an established file, install it on my PC, it runs the program, but only allows you to view it (through the form) through the record, but as soon as we Try to update / insert, it returns an error (one exception which we handled) is the code from one of the forms below: Actually just want to get it working, etc. Has been struggling for a long time

  public class EditProducts_Form Private Sub Products_Form_Load (ByVal as the sender. System.Object, ByVal systems such as e. EventArgs) MyBase handle. 'Try' TODO: This line of code loads data in the 'ChaosComputers_DatabaseDataSet.CC_Products' table. You can move, or remove it, as needed. Me.CC_ProductsTableAdapter.Fill (Me.ChaosComputers_DatabaseDataSet.CC_Products) catch FormLoadException or unable to load MessageBox.Show ( "database as exception" Try "error") End End Sub Private Sub btnExitProducts_Click (ByVal as System.Object in, ByVal .EventArgs) handle e system btnExitProducts.Click so MessageBox.Show (, "confirm exit", MessageBoxButtons.YesNo, MessageBoxIcon.Question) = Windows.Forms "Are you sure the product list? unsaved Changes will be lost for want to get out ". DialogResult.Yes then Me.Close () else: Me.Show () End End Sub Private Sub btnPreviousProd_Click (ByVal as the System.Object, ByVal manages e System.EventArgs) btnPreviousProd.Click CCProductsBindingSource. MovePrevious () will move as the sub private sub btnNextProd_Click (ByVal this System.Object previous record close, as ByVal e System.EventArgs) handles btnNextProd.Click CCProductsBindingSource.MoveNext () end sub Private sub btnAddNewProd _Click (ByVal handle this as System.Object, byVal E. System.EventArgs) btnAddNewProd.Click MessageBox.Show ("New in the empty text box provided" Enter the details of the product "," Enter details ", MessageBoxButtons.OK, MessageBoxIcon.Information) CCProductsBindingSource.AddNew () 'gridview End Sub as private sub btnSaveProd_Click (ByVal this System.Object, ByVal e System.EventArgs in) adds a new record to handle btnSaveProd.Click effort to "Save Start exception product handling button Me.Validate (for) Me.CCProductsBindingSource.EndEdit () Me.CC_ProductsTableAdapter.Update (Me.CoosComputers_DatabaseDataSet.CC_Products) MessageBox.Show ("Product saved successfully", "Product saved", MessageBoxButtons.OK, MessageBoxIcon.Information) Hold SavebtnExcption As MessageBox.Show ( "can clean up text boxes since Try Error", "Error") at the end to save data "*** product has been successfully saved. "*** When the record is not added successfully End Sub Private Sub btnDelete_Click (ByVal to as) as the System.Object, ByVal e System.EventArgs, here would be to include some kind of exception handling btnDelete .Click Try MessageBox Show ( "Are you sure you want to delete this product?", MessageBoxButtons.YesNo "Confirm delete" are,) = Windows.Forms.DialogResult.Yes then CCProductsBindingSource.RemoveCurrent () Me.CC_ProductsTableAdapter.Update (Me.ChaosComputers_DatabaseDataSet.CC_Products ) Otherwise remove Me.Show () end of the DeletebtnException then try to terminate MessageBox.Show ("An error occurred while attempting to delete the product", "Error"), as the exception is' *** User is sure to delete That should be prompted to ask ** * End Sub & Class  

Any help in solving this will be highly appreciated

Thanks in advance.


Comments

Popular posts from this blog

java - org.apache.http.ProtocolException: Target host is not specified -

How to access user directory in lazarus? -

java - Gradle dependencies: compile project by relative path -