Solved

Updating FileMaker Pro SequeLink Database With Parameters

Posted on 2012-03-13
1
452 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Get Database Help Now w/ Support & Database Audit

Keeping your database environment tuned, optimized and high-performance is key to achieving business goals. If your database goes down, so does your business. Percona experts have a long history of helping enterprises ensure their databases are running smoothly.

Question has a verified solution.

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

When it comes to protecting Oracle Database servers and systems, there are a ton of myths out there. Here are the most common.
Recently, Microsoft released a best-practice guide for securing Active Directory. It's a whopping 300+ pages long. Those of us tasked with securing our company’s databases and systems would, ideally, have time to devote to learning the ins and outs…
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…

710 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