Wrox Programmer Forums
|
Visual Basic 2005 Basics If you are new to Visual Basic programming with version 2005, this is the place to start your questions. For questions about the book: Beginning Visual Basic 2005 by Thearon Willis and Bryan Newsome, ISBN: 0-7645-7401-9 please, use this forum instead.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Visual Basic 2005 Basics section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old July 19th, 2006, 07:36 PM
Registered User
 
Join Date: Jul 2006
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Default VSTO Update database

I am having a problem trying to undate a Dataset in Excel to an Access data base. I am using VSTO 2005 with office 2003. This is the code I am trying to use but it errors and tells me that Validate and Update are not a member of Workbook.sheet1 Sheet1 is where I have the button. Obviously I am missing something but being I am a VBA guy trying to learn .net I am having some problems.

Thanks for any help.
Tom Hallmark

Private Sub btnUpdate_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnUpdate.Click

        Try
            Me.Validate()
            Me.TRgraphBindingSource.EndEdit()
            Me.TRgraphTableAdapter.Update(Me.TRgraphDBDataSet. TRgraph)
            MsgBox("Update successful")

        Catch ex As Exception
            MsgBox("Update failed")
        End Try
    End Sub
 
Old July 20th, 2006, 12:14 PM
Friend of Wrox
 
Join Date: Nov 2004
Posts: 1,621
Thanks: 1
Thanked 3 Times in 3 Posts
Default

T,

It is a good idea to post a question in more than one formu (gets more exposure).
But when you do that, post the text of the question in one place, copy the URL to the question, and just post the URL in the other fora. That way all traffic on the question will be in one place.
(It's not too late to switch this questio to that mode. You can edit the additional postings.)
 
Old July 20th, 2006, 06:27 PM
Registered User
 
Join Date: Jul 2006
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Thank you. Maybe I should explain a little better what I am trying to do.
In vs.2005 tools for office. I am connecting an excel workbook to a data base by dragging and dropping the dataset onto the excel sheet. It populates correctly and when I select the data in the combo box the list updates correctly. Now I want to make changes to the list box and update it in the database by clicking a button(or automatically would work) So far I have the next/previous fields to work but I cannot figure how to update. Everything I have read says to use the tableadapter update that does not seem to work.

Sure would appreciate any help.

Tom





Similar Threads
Thread Thread Starter Forum Replies Last Post
How can I UPDATE database? zoltac007 ASP.NET 2.0 Basics 1 July 25th, 2007 03:24 PM
Why can I not update my database? fazzou Access 5 November 16th, 2006 11:13 AM
VSTO Update database T Hallmark VB Databases Basics 0 July 19th, 2006 07:34 PM
VSTO Update database T Hallmark VS.NET 2002/2003 0 July 17th, 2006 10:14 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.