locked
Unable to update database in visual studio 2008 using VB for mobile application

    質問

  • Writing application for mobile device using Visual Studio 2008, Visual Basic, SQL Server Compact Edition Database. During testing with emulator, datagrid fetches and shows data properly, allows changes and additions.  However, these changes are not applied to the database.

    I even wrote a separate simple update query hardcoded with values, tested it in the query builder inside visual studio (it worked).  However, when called from within the application, it does not update the database.

    I saw a posting which recommended changing one of the properties of the database, "Copy to output direct" to "do not copy". I tried that but the application could not locate the database.

    Here is my simple update command, which probably has nothing to do with the problem.

    Try
        Me.NJIT_AssetsTableAdapter.Update(Me.NJIT_Fixed_AssetsDataSet)
        System.Windows.Forms.MessageBox.Show("Update Complete")

        Catch ex As System.Exception
              System.Windows.Forms.MessageBox.Show(ex.Message)
    End Try

    Thanks for any advice,

    Scott

    2012年2月28日 15:07

すべての返信