Results 1 to 7 of 7
  1. #1
    Lounger
    Join Date
    May 2003
    Posts
    33
    Thanks
    3
    Thanked 1 Time in 1 Post

    database programming

    I'm sure this must have been covered here, and I'm sure it's on the net, but having spent days searching my hair is much thinner and greyer than it was before! I have an old VB6 program I wrote which is a front end to an Access Database - I need to update this to .net . I've managed most of it but adding new records and keeping updates to records seems to elude me - I'm sure I've followed the process but it seems to not want to work. I can see that changes are made when I run the program. Then I stop the program and run it again and the changes aren't there. Probably my advanced age, but any help would be much appreciated!

    I'm using this as code for testing
    rowNewRowL = Bookings_DatabaseDataSet.MAGIC94.NewRow
    rowNewRowL.Item("Date") = "07 March 2017"
    rowNewRowL.Item("Start time") = Format(Now(), "hh:mm")
    rowNewRowL.Item("End time") = Format(Now(), "hh:mm")
    rowNewRowL.Item("Approx Nos") = 10
    rowNewRowL.Item("Booker") = "test"
    rowNewRowL.Item("Fee") = 100
    Bookings_DatabaseDataSet.MAGIC94.Rows.Add(rowNewRo wL)

  2. #2
    Lounger
    Join Date
    May 2003
    Posts
    33
    Thanks
    3
    Thanked 1 Time in 1 Post
    there is a typo in my example - but you probably realised that - the "date" field stuff IS correct in my testing version, I just managed to past the quotes in the wrong place here!

  3. #3
    5 Star Lounger
    Join Date
    Jan 2010
    Location
    Fort McMurray, Alberta, Canada
    Posts
    720
    Thanks
    73
    Thanked 99 Times in 92 Posts

    Talking

    Imaginary Conversation

    aidan100: Update recordset
    VB6: Eh?
    aidan100: Update recordset. Go!
    VB6: Can you speak up? I can't hear you.
    aidan100: Update recordset. UPDATE RECORDSET. Sorry, didn't mean to yell...
    VB6: Where was I? Oh, yes, OK it's done.
    aidan100: Good... wait a minute! Not it's not!
    VB6: It isn't? Well, I am 20 years old you know. That's like 100 in dog, uh, software years!
    aidan100: Update recordset. Please.
    VB6: Ohhhhh, my bits are stiff. I slept funny last night...
    aidan100: Update recordset? Are you... do you need help with that?
    VB6: I'm not a child you know!
    aidan100: Well, are you going to Update recordset or not?
    VB6: There's no need to get snippy.
    aidan100: I'M NOT...! Sorry. It's just... I need an answer. Can you update?
    VB6: Whippersnappers. Think they know everything! I was updating recordsets when you were in short pants...


    Spoken as a man with elderly parents.

  4. #4
    Lounger
    Join Date
    May 2003
    Posts
    33
    Thanks
    3
    Thanked 1 Time in 1 Post
    Well, I like the imaginary conversation (as a 56 year old man with 2 young children I would). My earliest database was on a C64, I've moved forwards over the years and moved languages too - armed with at least some documentation I can work things out, but this has me confused - as I'm sure I've done all that the vast number of searches suggest should be needed
    Quote Originally Posted by BHarder View Post
    Imaginary Conversation


    Spoken as a man with elderly parents.

  5. #5
    Lounger
    Join Date
    May 2003
    Posts
    33
    Thanks
    3
    Thanked 1 Time in 1 Post
    and now I've found a tutorial which explains it all. How foolish of me - despite having a shedload of controls, and therefore foolishly thinking they were live controls, I know now they are snapshots only, and I need a shedload of code to do what used to be done in simple controls. Which is not a problem, and better in a way, but annoying not to know that first!!

  6. #6
    2 Star Lounger Bender's Avatar
    Join Date
    Mar 2010
    Location
    Winston-Salem, NC USA
    Posts
    130
    Thanks
    17
    Thanked 17 Times in 16 Posts
    Yeah, I remember the marketing that they put out in the early days of NET... It's a Rapid Application Development Environment, they said. And then they showed the picture of the guy punching out his work then spending the afternoon surfing (or whatever). It's all BS. If I'm not writing twice the code it's 3 times as much as it took in VB6.
    Do your part!!! Report SPAM to http://www.spamcop.net/

  7. #7
    WS Lounge VIP mrjimphelps's Avatar
    Join Date
    Dec 2009
    Location
    USA
    Posts
    3,918
    Thanks
    517
    Thanked 465 Times in 434 Posts
    Quote Originally Posted by BHarder View Post
    Imaginary Conversation

    aidan100: Update recordset
    VB6: Eh?
    aidan100: Update recordset. Go!
    VB6: Can you speak up? I can't hear you.
    aidan100: Update recordset. UPDATE RECORDSET. Sorry, didn't mean to yell...
    VB6: Where was I? Oh, yes, OK it's done.
    aidan100: Good... wait a minute! Not it's not!
    VB6: It isn't? Well, I am 20 years old you know. That's like 100 in dog, uh, software years!
    aidan100: Update recordset. Please.
    VB6: Ohhhhh, my bits are stiff. I slept funny last night...
    aidan100: Update recordset? Are you... do you need help with that?
    VB6: I'm not a child you know!
    aidan100: Well, are you going to Update recordset or not?
    VB6: There's no need to get snippy.
    aidan100: I'M NOT...! Sorry. It's just... I need an answer. Can you update?
    VB6: Whippersnappers. Think they know everything! I was updating recordsets when you were in short pants...


    Spoken as a man with elderly parents.
    I always keep asking until they finally give me a yes or no.

Posting Permissions

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