Results 1 to 8 of 8

Thread: Plz help me on this :)

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Oct 2005
    Posts
    70

    Arrow Plz help me on this :)

    Heya,

    I'm currently having a trouble at this part:

    To get data from databases I use datasets, of wich I want to bind certain tables to textboxes/comboxes.

    For example I have a textbox, calling txtProject and a dataset ServerInfoDataset1 (instance of ServerInfoDataset, dragged onto the design form)

    After executing the stored procedure and filling the dataset, I do the following line in code:

    VB Code:
    1. Me.txtProject.DataBindings.Add("Text", Me.ServerInfoDataset1, "ServerInfo.Project")

    This worx cool, but suppose I would like to do this in design time, because I have a hell of a load of textboxes/comboboxes.
    I now tried to go to properties -> "Data" -> "DataBindings" -> under "Text" : browse to ServerInfo -> Project in the ServerInfoDataSet1 I find in there.
    The problem is, after running the project, the value in the textbox doesn't get updated after filling the dataset...

    When I'm trying the same with a combobox, only 1 value is shown when coded, and nothing shown when I databind the respective table to the combobox in design time

    Anyone knows what is going wrong in the design part?
    Last edited by Dagon; Nov 14th, 2005 at 06:03 AM.

  2. #2
    I'm about to be a PowerPoster! mendhak's Avatar
    Join Date
    Feb 2002
    Location
    Ulaan Baator GooGoo: Frog
    Posts
    38,170

    Re: Plz help me on this :)

    I do not see how filling it at design time makes things easier. Why do you not want to use code, other than the fact that you have a lot of textboxes? It'll certainly involve lots more clicking in design time

  3. #3

    Thread Starter
    Lively Member
    Join Date
    Oct 2005
    Posts
    70

    Re: Plz help me on this :)

    Hmm, true, thought it could give me a better overview by doing it in design time.

    But still, how do I make my combobox to fill with the values from a table from the dataset??

  4. #4
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    111,221

    Re: Plz help me on this :)

    You've posted this same question twice less than an hour and a half apart. Even without the short delay it is considered poor form to post the same question twice. It's one of my pet hates and I know there are others who find it annoying also. Just so you know.
    Why is my data not saved to my database? | MSDN Data Walkthroughs
    VBForums Database Development FAQ
    My CodeBank Submissions: VB | C#
    My Blog: Data Among Multiple Forms (3 parts)
    Beginner Tutorials: VB | C# | SQL

  5. #5

    Thread Starter
    Lively Member
    Join Date
    Oct 2005
    Posts
    70

    Re: Plz help me on this :)

    I'm very sorry about this fact, but I posted this one as copy of the other post with other title in the hope people would pay more attention to this one as it is quite important to me...
    I would have deleted the old post after posting this one, but it seems posts can't be deleted
    Last edited by Dagon; Nov 14th, 2005 at 07:29 AM.

  6. #6
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    111,221

    Re: Plz help me on this :)

    Quote Originally Posted by Dagon
    I'm very sorry about this fact, but I posted this one as copy of the other post with other title in the hope people would pay more attention to this one as it is quite important to me...
    I would have deleted the old post after posting this one, but it seems posts can't be deleted
    You can edit existing posts of your own, including the title, so there is never a need to start a new thread. If you want to get people's attention you can add another post to your existing thread to move it back to the top of the list, hence the "bump" posts you'll see about. I suggest that you wait considerably longer than 80 minutes before doing that though, or people will perceive you as pushy. If you want a thread deleted then I'd suggest adding a post requesting so and if a moderator sees it they will generally oblige if it doesn't disadvantage others, like when there are no other posts but your own.
    Why is my data not saved to my database? | MSDN Data Walkthroughs
    VBForums Database Development FAQ
    My CodeBank Submissions: VB | C#
    My Blog: Data Among Multiple Forms (3 parts)
    Beginner Tutorials: VB | C# | SQL

  7. #7

    Thread Starter
    Lively Member
    Join Date
    Oct 2005
    Posts
    70

    Re: Plz help me on this :)

    ok, thx, didn't know about the ability to change the title, and was hopeing I was able to delete the old post myself.
    I shall post a request to the old one to delete it...

    Sorry for the inconvinience once more...

  8. #8

    Thread Starter
    Lively Member
    Join Date
    Oct 2005
    Posts
    70

    Re: Plz help me on this :)

    I managed to get the combobox binding to work, but the textbox doesn't seem to update with changes in the selected record??
    I tried with txtBox.refresh() etc, but doesn't seem to work either

    Any solutions to this?

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