• 0
Login to follow this  
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

  • 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

Share this post


Link to post
Share on other sites

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

Login to follow this