• database programming

    Author
    Topic
    #508338

    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(rowNewRowL)

    Viewing 3 reply threads
    Author
    Replies
    • #1592852

      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!

    • #1592873

      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.
      😀

      • #1592902

        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

        Imaginary Conversation

        Spoken as a man with elderly parents.
        😀

      • #1593001

        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. 😉

        Group "L" (Linux Mint)
        with Windows 10 running in a remote session on my file server
    • #1592945

      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!!

    • #1593000

      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.

    Viewing 3 reply threads
    Reply To: database programming

    You can use BBCodes to format your content.
    Your account can't use all available BBCodes, they will be stripped before saving.

    Your information: