Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. Visual Basic
  4. Probs Saving Data to Database

Probs Saving Data to Database

Scheduled Pinned Locked Moved Visual Basic
csharpdatabasedotnetvisual-studiomcp
3 Posts 2 Posters 1 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • K Offline
    K Offline
    KrisnNala
    wrote on last edited by
    #1

    Hi folks Hope you can give me a hint, I've spent 3 days trying to sort this out! Working in visual studio 2005 proff, with .net framework 3.5. Application has got various forms that are children of a parent. All are loading, adding, saving and deleting fine. Apart from one. I've tried an insert and made it a scaler. I've tried all sorts and just cannot get this to save. It will do MemberID (Primary key) ClientsMare, and clientsid(fk) but clientsname, maresname, percentage no go Here's the Public Sub for Saving. Public Sub SaveMember() Adding = False Deleting = False lblMemberID.Text = CurrentMemberID Me.SyndicateMembersBindingSource.EndEdit(); Me.SyndicateMembersTableAdapter.InsertMember(CurrentSyndicateID, MaresName, CurrentMareID, CurrentPercentage, CurrentClient) Me.SyndicateMembersTableAdapter.Update(Me.DachelDataSet.Tables("SyndicateMembers")) Welcome.btnSave.Enabled = False 'ONCE FINISHED NEED TO MAKE THIS FILL TO A FILLBYSYNDICATEID Me.SyndicateMembersTableAdapter.FillByMember(Me.DachelDataSet.SyndicateMembers, CurrentMemberID) Welcome.btnAdd.Enabled = True End Sub any ideas why I'm having this prob on just one form? Thanks:mad::confused:

    Kris MCP

    C 1 Reply Last reply
    0
    • K KrisnNala

      Hi folks Hope you can give me a hint, I've spent 3 days trying to sort this out! Working in visual studio 2005 proff, with .net framework 3.5. Application has got various forms that are children of a parent. All are loading, adding, saving and deleting fine. Apart from one. I've tried an insert and made it a scaler. I've tried all sorts and just cannot get this to save. It will do MemberID (Primary key) ClientsMare, and clientsid(fk) but clientsname, maresname, percentage no go Here's the Public Sub for Saving. Public Sub SaveMember() Adding = False Deleting = False lblMemberID.Text = CurrentMemberID Me.SyndicateMembersBindingSource.EndEdit(); Me.SyndicateMembersTableAdapter.InsertMember(CurrentSyndicateID, MaresName, CurrentMareID, CurrentPercentage, CurrentClient) Me.SyndicateMembersTableAdapter.Update(Me.DachelDataSet.Tables("SyndicateMembers")) Welcome.btnSave.Enabled = False 'ONCE FINISHED NEED TO MAKE THIS FILL TO A FILLBYSYNDICATEID Me.SyndicateMembersTableAdapter.FillByMember(Me.DachelDataSet.SyndicateMembers, CurrentMemberID) Welcome.btnAdd.Enabled = True End Sub any ideas why I'm having this prob on just one form? Thanks:mad::confused:

      Kris MCP

      C Offline
      C Offline
      Christian Graus
      wrote on last edited by
      #2

      Because you're using the nasty built in stuff, you're just plain hoping it magically writes the right SQL for you. Write your own SQL and then you'll have control over what it does.

      Christian Graus Please read this if you don't understand the answer I've given you. If you're still stuck, ask me for more information.

      K 1 Reply Last reply
      0
      • C Christian Graus

        Because you're using the nasty built in stuff, you're just plain hoping it magically writes the right SQL for you. Write your own SQL and then you'll have control over what it does.

        Christian Graus Please read this if you don't understand the answer I've given you. If you're still stuck, ask me for more information.

        K Offline
        K Offline
        KrisnNala
        wrote on last edited by
        #3

        Thanks for that, I'll do that. Sorry for the late reply, been in meeting all day.

        Kris MCP

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups