I'm updating a FM Pro database via the ADODB namespace. I didn't make this code originally, but it uses string concatenation in a RecordSet to update the database. Personally, I'd rather use parameters, like in SQL, because it makes the code a million times easier to read. I've had a bunch of small problems concatenating so far and it's becoming frustrating.
I looked up the documentation, which you can view here
The specific page that explains how to do it is here
. But that looks completely different from what we're doing. It doesn't look like they're using the ADODB namespace like we are.
So, from the code below, how would I add parameters? Or would I need to switch to what the documentation is using?
Dim connection As New Connection()
Dim record_set As New Recordset
Dim test As New Command
connection.Open(My.Settings.FMPDSN) 'FM connection string for SequeLink
record_set.Open("UPDATE Traveler SET TestResult = '1', BurnInDate = '" & record.Item("Date_Test") & "'" & " WHERE Service_Order_ID = '" & record.Item("CSO_N").ToString & "'", connection)