• 0

$5 to the person that can fix this(VB)


Question

I NEED to have this program fixed, i cant get it to write to this stupid access database file :angry:

I will pay using paypal to the person that can get it to write to the rps.mdb file

One note, don't convert the access file to 2000, leave it in its current formatting..

Any questions PM me.

Thanks

Steve

help_me_neowin_.zip

Link to comment
https://www.neowin.net/forum/topic/151040-5-to-the-person-that-can-fix-thisvb/
Share on other sites

13 answers to this question

Recommended Posts

  • 0

The point where it is wrong is (i think) the writing to the database

"Private Sub cmdWrite_Click()

'write results to database

'Set Adodc1 = New ADODB.Connection

If R1_Win = 5 Then

Adodc1.RecordSource = "INSERT into rps (RealName1, RealName2, VictorRealName, Losses)" & _

"VALUES ('" & Real1 & "', '" & Real2 & "', '" & Winner & "', " & R2_Win & ")"

Else

Adodc1.RecordSource = "INSERT into rps (RealName1, RealName2, VictorRealName, Losses)" & _

"VALUES ('" & Real1 & "', '" & Real2 & "', '" & Winner & "', " & R1_Win & ")"

End If

'display results were written

MsgBox "Results Written to rps.mdb", vbInformation, "Database Write"

End Sub

If you know VB this should be an easy problem

I'm just to retarted to get it right

I am TOTALLY serious about the money too, I really need this fixed

-steve

  • 0

You need to test your strings for null values. Real1 and Real2 come up emtpy each time for me.

       Dim adoCmd As ADODB.Command
        Dim adoConn As ADODB.Connection
        Set adoConn = New ADODB.Connection
        adoConn.ConnectionString = Adodc1.ConnectionString
        adoConn.Open
        Set adoCmd = New ADODB.Command
        
        adoCmd.ActiveConnection = adoConn
        If Real1 = "" Then
            Real1 = "n/a"
        End If
        
        If Real2 = "" Then
            Real2 = "n/a"
        End If
        
        If R1_Win = 5 Then
            adoCmd.CommandText = "INSERT into rps (RealName1, RealName2, VictorRealName, Losses)" & _
            "VALUES ('" & Real1 & "', '" & Real2 & "', '" & Winner & "', " & R2_Win & ")"
        Else
            adoCmd.CommandText = "INSERT into rps (RealName1, RealName2, VictorRealName, Losses)" & _
            "VALUES ('" & Real1 & "', '" & Real2 & "', '" & Winner & "', " & R1_Win & ")"
        End If
        
        adoCmd.Execute
        'display results were written
        MsgBox "Results Written to rps.mdb", vbInformation, "Database Write"
        adoConn.Close
        Adodc1.Refresh

This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Posts

    • This might work, but the boot menu F12 only shows hdd and dvd+/- and Niks In the bios all usb are enabled. the usb stick is in place and in the boot menu it does not show up in the bios boot order.
    • Because we were never offered a UFC game to review it in the past. Sometimes it's not a conspiracy, the reviewer does not even live in the U.S. and didn't ask for it.
    • Apple releases iOS 27 Beta 2 for developers and power users by Aditya Tiwari It's been a couple of weeks since Apple previewed the iOS 27 update during the WWDC official keynote. The upcoming iOS version will bring even more refinements to the Liquid Glass design language, an upgraded Siri AI assistant, and several new Apple Intelligence features. Interestingly, the latest WWDC keynote was different than previous years. Apple has released the iOS 27 beta 2 (build 24A5370h) for developers who want to test the new features being baked for the iPhone and optimize their apps. If you're interested in downloading the latest beta, go to Settings > General > Software Update > beta Updates, then choose iOS 27 Developer Beta. You can download the latest iOS 27 beta on more than 30 supported iPhones. Make sure you know what you are doing since developer betas can be unstable and unexpected at times. If you want to be on the safer side, you can wait for the public beta, which will arrive next month. It's been a while since Apple discontinued its AirPort router lineup. Now, the company said in the iOS 27 beta 2 release notes that the AirPort Utility is deprecated and won't be available for new downloads from the App Store. Apple added that if you previously downloaded the app, you can re-download it. However, the functionality isn't guaranteed when using the AirPort Utility on iOS 27 or later. Speaking of known issues, Apple said that the Portrait mode blur effect might render incorrectly for photos; you may be unable to stop an alarm from the lock screen without unlocking your iPhone; the "Add a Control" button in Control Center edit mode might appear small or clipped. There are several new features in iOS 27 beta 2 as well. It comes with Neural Engine improvements for Apple Intelligence, including better performance when loading large models over 1GB. HomeKit Secure Video recordings are processed on-device and through Private Cloud Compute for video descriptions and search, when Apple Intelligence is enabled in the Home app. That said, you can also download the second betas of macOS 27 Golden Gate, iPadOS 27, watchOS 27, and other Apple operating systems.
    • FSR 4.1 is insanely superior to FSR 3. Like, FSR 4.1 Performance looks better than FSR 3.1 Quality. It's great they are finally enabling it for RX 7000 users. A bit late, but I guess better late than never.
  • Recent Achievements

    • Rookie
      dorf went up a rank
      Rookie
    • First Post
      mike_rumble earned a badge
      First Post
    • Dedicated
      tuben earned a badge
      Dedicated
    • Week One Done
      mnsgroup earned a badge
      Week One Done
    • Conversation Starter
      sumytbe earned a badge
      Conversation Starter
  • Popular Contributors

    1. 1
      +primortal
      501
    2. 2
      +Edouard
      203
    3. 3
      PsYcHoKiLLa
      98
    4. 4
      Michael Scrip
      80
    5. 5
      neufuse
      67
  • Tell a friend

    Love Neowin? Tell a friend!