Results 1 to 7 of 7

Thread: [2005] Data

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Apr 2005
    Posts
    331

    [2005] Data

    Hello all. I am creating a application where it is a contact manager.
    In the program I want to be able to view contacts, add them then save. I can create a MS Access database for this. Or an Excel spreadsheet. But I think I can make a datagrid display the database, but would it be editable? If the DB is editable do I just type in what I want to add? And also how would I make it save? This is very important to me. I need to code this contact manager. Please help. Currently I have like 5% done. I have an MS Access database.
    What next?
    Katya Chehova is best!

  2. #2
    Addicted Member
    Join Date
    Mar 2006
    Posts
    235

    Re: [2005] Data

    Use a DataGridView.

    There are some examples in the help files.

  3. #3

    Thread Starter
    Hyperactive Member
    Join Date
    Apr 2005
    Posts
    331

    Re: [2005] Data

    Alright, but with DataGridView am I allowed to save to the database? And also for the DataGridView do you need an Access database or an Excel spreadsheet?
    Last edited by 3dmaker; Apr 29th, 2006 at 12:51 PM.
    Katya Chehova is best!

  4. #4
    Addicted Member dim_kevin_as_human's Avatar
    Join Date
    Oct 2005
    Location
    Wisconsin
    Posts
    183

    Re: [2005] Data

    Quote Originally Posted by 3dmaker
    Alright, but with DataGridView am I allowed to save to the database? And also for the DataGridView do you need an Access database or an Excel spreadsheet?
    you will notice when you add a DataGridView to your project, you will be able to choose the tasks such as adding and editing. A DataGridView requires at least an access or SQL database.
    Dreaming men are haunted men.

  5. #5

    Thread Starter
    Hyperactive Member
    Join Date
    Apr 2005
    Posts
    331

    Re: [2005] Data

    Ok, I have added the database to the DataDridView, it is great because it shows my database. This is great. Now, I added a button to the form, and how do I make it so when I click my button it saves the database?
    Katya Chehova is best!

  6. #6

    Thread Starter
    Hyperactive Member
    Join Date
    Apr 2005
    Posts
    331

    Re: [2005] Data

    I tried

    Me.DataGridView1.Update(Me.CnmngDataSet.Contacts)

    But I get this error:
    Error 1 Too many arguments to 'Public Sub Update()'. C:\Documents and Settings\george\My Documents\Visual Studio 2005\Projects\doors\doors\Contact\conmain.vb 10 33 doors

    Then I tried this

    Me.ContactsBindingSource.EndEdit()
    Me.ContactsTableAdapter.Update(Me.CnmngDataSet.Contacts)

    I understand that when I run the application again the old database gets copied over, so after I click the button I open the database in Access and there are no changes. What do I do next? I am out of ideas.
    Last edited by 3dmaker; Apr 29th, 2006 at 02:31 PM.
    Katya Chehova is best!

  7. #7

    Thread Starter
    Hyperactive Member
    Join Date
    Apr 2005
    Posts
    331

    Re: [2005] Data

    Wow never mind guys! I was opening the wrong database! LOL! It works! Thanks for all the help for everyone!
    Katya Chehova is best!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width