AnsweredAssumed Answered

Need some help for Filemaker 15 Server and ADODB via VBA

Question asked by mawi on May 10, 2017

Dear all,

i'm trying to connect my new Filemaker Server Database from VBA code (Excel).

Everything works fine (read data from Filemaker), but when i try to write or update some recordsets it crashed with "Multiple-Step Operation generated Errors. Check each Status Value".

 

My Code is:

 

    Dim mysqlcn As adodb.Connection

    Dim rssql As adodb.Recordset

        ' Server = "134.95.243.190"

        ' Server = "10.76.32.65"

        Server = "xxxx"

        user = "xxxx"

        Pwd = "xxxx"

        DBName = "xxxxx"

        ConnectionString = "Provider=MSDASQL;Driver=FileMaker ODBC;" & _

            "Server=" & Server & ";Database=" & DBName

    Set mysqlcn = New adodb.Connection

        mysqlcn.CursorLocation = adUseClient

        mysqlcn.Mode = adModeRead + adModeShareDenyNone

        mysqlcn.Open ConnectionString, user, Pwd

    

   

    

  

    mysqlstring = "SELECT * FROM " & DBName & " WHERE RITh_Fall_ID = '" & PatID & "'"

    

    Set rssql = New adodb.Recordset

    rssql.CursorLocation = adUseClient

    rssql.CursorType = adOpenDynamic

    rssql.LockType = adLockOptimistic

    Set rssql.ActiveConnection = mysqlcn

    rssql.Open mysqlstring

    If rssql.RecordCount > 0 Then

    rssql.MoveFirst

     MsgBox (rssql!Name)                                'This Works fine

    rssql!Entlassungsdatum = date                 'Here it crashed

            rssql.Update

    rssql.Close

    mysqlcn.Close

 

 

 

 

Thanks in advanced

Markus

Outcomes