Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

This topic is 3824 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted

I am connecting to FM Server 13 via ODBC with WinBatch. I realize there are probably not many here with WinBatch experience, but hopefully someone can help me. I have tried getting help on the Winbatch forum, but they think the problem is something peculiar to FM Server ODBC. I think the problem is connection-related, not Winbatch.

My guess is something to do with cursor location or type or record locking, although I think I have tried every combination.

I am able to connect and read data with the following 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:';UI D=':User:';PWD=':Pass:';'
cConn.Open()

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-Step operation generated errors...

RS1.Collect("StudioName")="12345"


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

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

Any thoughts?


Thanks,

Paul Samuelson

This topic is 3824 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.