Hi,
Thank you for your enquiry.
I assume that you have already set up a Post Web Data action (setting the publication as the Source) which sends the required variables and values to the .asp file.
This being the case, you simply need to use Request() functions to recieve the post data and store the values to variables in the script. For example, if the Post Web Data actions sends four variables named 'first_name', 'surname', 'age' and 'occupation', your ASP file would need to contain the following block of actions prior to any updating of the database:
Code:
first = request("first_name")
last = request("surname")
age = request("age")
addr = request("address")
You should now be able to use these 'first', 'last', 'age' and 'addr' variables within your database query.
To send data from ASP to the publication, you will need to use the Response.Write function. For example, to send the 'first', 'last', 'age' and 'addr' values of the current record back to the publication, you would use the following code:
Code:
Response.Write "first_name=" & Server.URLEncode(recordset("first")) & _
"&surname=" & Server.URLEncode(recordset("last")) & _
"&age=" & Server.URLEncode(recordset("age")) & _
"&address=" & Server.URLEncode(recordset("addr"))
where 'recordset' is the name of your database connection and 'first_name', 'surname', 'age' and 'address' are the variables you wish to populate in your publication. Of course, when receiving data in this way, you will need to ensure that you have set the publication as the Destination in the Post Web Data action.
I hope this helps. Please do not hesitate to contact me if you have any further queries.
Kind regards,