Solved

Updating FileMaker Pro SequeLink Database With Parameters

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

Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.

Question has a verified solution.

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

Entering a date in Microsoft Access can be tricky. A typo can cause month and day to be shuffled, entering the day only causes an error, as does entering, say, day 31 in June. This article shows how an inputmask supported by code can help the user a…
It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
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…

770 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