AnsweredAssumed Answered

ODBC access to FMS 13

Question asked by paulsamuelson on Jun 2, 2014

Title

ODBC access to FMS 13

Your post

     I am able to successfully make an ODBC connect to FMS 13 from WinBatch. After connecting I can read data with OLE:

This is WinBatch code.

     DBServer="192.168.1.129"
     Database="dbname"
     User="ODBC"
     Pass="password"

     cConn=ObjectCreate("ADODB.Connection")
     RS1 = ObjectCreate('ADODB.Recordset')
     RS1.CursorLocation=3;adUseClient

     cConn.ConnectionString='DRIVER={FileMaker ODBC};SERVER=':DBServer:';DATABASE=':Database:';UID=':User:';PWD=':Pass:';'
     cConn.Open()
      

This works:

     RS1.Open("SELECT * FROM Studios WHERE Code='Test'",cConn,3,3)
     StudioName=RS1.Collect("StudioName")
     message("Studio",StudioName)
      

      

     However, if I try to update data I get Error 1261, Multi-Stop operation generated errors...

This fails:
     RS1.Collect("StudioName")="12345"

      



     I am able to use SQL to make changes, but would prefer to use ADO if possible.

This works:
     RS1.Open("UPDATE Studios SET StudioName='12345' WHERE Code='Test'",cConn,3,3)

     Any thoughts?


     Thanks,

     Paul Samuelson

Outcomes