Using VBA, can I format data so a web server will regard the data as a struct?

  • Thread starter Thread starter Sisyphus
  • Start date Start date
S

Sisyphus

I've been an Access developer for five years now, but I am woefully
ignorant when it comes to processes and technologies outside of
Access/VBA. If what follows is clumsily worded, and if I misuse
terminology, please be patient...

We have an access database that tracks client information and we want
the database to open a session on a website, transfer data to that
website, and receive in return a url that will allow us to open a web
page as far along into the session as the provided data will carry us.

The programmers behind this website have set up five methods that I
need to trigger. The first method returns a website sessionID. I wrote
the following code to return that sessionID.

Set DOMDocument = Client.Execute(server path here, web page here,
"getsessionID" method here).

This worked. I return the sessionID. The next line of code fails. That
code:

Set DOMDocument = Client.Execute(server path here, web page here,
"passHouseholdInfo" method here, sessionID value here, household
data here).

The household data is supposed to be a "struct" data type. Online
I've found the term "struct" used in a generic sense - as a
variable made up of other data types - and in a language specific
sense - as a specific data type in other programming languages.

My problem: I can't find a way in VBA to format our household data so
that the method on the server regards it as a struct. I tried packaging
the data as a string that matched exactly the formatting of a struct
(using a sample struct that the web programmers sent me). That didn't
work. It didn't work when I packaged the data in an array, nor when I
packaged it inside of a user defined type. In each instance I received
this error:

Exception: (13, 'data must be type struct')

I asked the web programmer if he could code something on his end that
would receive the data in one of the above formats and translate it
into a struct before feeding it into his method, and he said that that
would be very difficult to do. So, the ball is back in my court.

My questions:
1. Using VBA, is there any way I can package my household data so that
the server regards it as a struct?
2. If not, is there an easier way, or perhaps a more common way, that
VBA programmers pass data to websites and receive information in
return?

Thanks in advance,

Tom
 
If you're at liberty to do so, can you post the example of the struct that
the developer of the component provided? I can't promise that this will
enable me to help you, but it might - or perhaps seeing the example might
enable someone else to help you.
 
BTW: Also any explanation or description that the component developer
provided?
 
Hi Brandan. Thanks for responding.

I think we've figured a way around this. The web developer set up the
methods on his end to anticipate an array of values rather than a
'struct' of values, and this seems to be working: I've loaded the data
into an array and passed it into the method, and the method now
recognizes the values and responds appropriately. So, problem solved, I
hope.

Thanks again Brandan for taking a look at my post...

Tom
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top