Solved

Updating FileMaker Pro SequeLink Database With Parameters

Posted on 2012-03-13
1
401 Views
Last Modified: 2012-06-21
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)
      
        connection.Close()

Open in new window


Thanks
0
Comment
Question by:weirddemon
1 Comment
 
LVL 83

Accepted Solution

by:
CodeCruiser earned 500 total points
ID: 37717728
Here are couple of examples showing use of parameters

http://support.microsoft.com/kb/195047

http://www.freevbcode.com/ShowCode.asp?ID=3687
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Need help parsing JSON in my VB.Net application 4 43
How to SQL Trace a SPECIFIC query 24 57
C# Single Form 8 27
Web Form VB.Net  import CSV 4 24
Entity Framework is a powerful tool to help you interact with the DataBase but still doesn't help much when we have a Stored Procedure that returns more than one resultset. The solution takes some of out-of-the-box thinking; read on!
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
Video by: Steve
Using examples as well as descriptions, step through each of the common simple join types, explaining differences in syntax, differences in expected outputs and showing how the queries run along with the actual outputs based upon a simple set of dem…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

912 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now