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
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