Solved

Updating FileMaker Pro SequeLink Database With Parameters

Posted on 2012-03-13
1
430 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

What is SQL Server and how does it work?

The purpose of this paper is to provide you background on SQL Server. It’s your self-study guide for learning fundamentals. It includes both the history of SQL and its technical basics. Concepts and definitions will form the solid foundation of your future DBA expertise.

Question has a verified solution.

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

CCModeler offers a way to enter basic information like entities, attributes and relationships and export them as yEd or erviz diagram. It also can import existing Access or SQL Server tables with relationships.
Read about achieving the basic levels of HRIS security in the workplace.
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…

820 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