Jump to content
  • 0

Web Services question


verdyathome

Question

Due to the delay in having access to Mass Update through Caspio. I'm appealing to you to please answer my one remaining question in setting up a temp Web services solution using VBA in Excel 2007. I have used the Caspio API examples & documentation for VBA and changed the code to create an update API call and it works. The only issue I have is that I would like the value list & part of the criteria to be a variable it works with fixed values. But I can't seem to get it to work with variables, I don't mind if it's a cell reference or a form text box in Excel.

The following works with fixed valuesobj.wsm_UpdateData TextBoxAccountId.Value, TextBoxProfile.Value, TextBoxPassword.Value, TextBoxTableName.Value, False, "Trailer_No", "'CSU12345'", "Route = 'ABC'"

This doesn't work with variablesobj.wsm_UpdateData TextBoxAccountId.Value, TextBoxProfile.Value, TextBoxPassword.Value, TextBoxTableName.Value, False, "Trailer_No", TextBoxTrailer_No.Value, "Route = TextBoxRoute.Value"I've tried numerous variants with () or '' or "" combinations

Please Help, if I can make this work I can wait longer for the Mass updateBest Regards

Link to comment
Share on other sites

1 answer to this question

Recommended Posts

  • 0

In fact with a little more detective work and light bulb going on inside my head I have managed to resolve the issue myself. For those who maybe interested the answer is below:-

The answer really was not so much in VBA, but how to manage variables in SQL statements, once I understood this a quick internet search provided the answer.

obj.wsm_UpdateData TextBoxAccountId.Value, TextBoxProfile.Value, TextBoxPassword.Value, _

TextBoxTableName.Value, False, "Trl_No", TrailerNoField, "route = '" & RouteField & "'"

Seem to have save myself $150 minimum in Caspio developer support charges. So worth the extra effort.

Regards

Simon

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...