Jump to content

Archived

This topic is now archived and is closed to further replies.

  • 0
verdyathome

Web Services question

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

Share this post


Link to post
Share on other sites

1 answer to this question

Recommended Posts

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

Share this post


Link to post
Share on other sites

×
×
  • Create New...