Solved

How can I update a URL returned in a query?

Posted on 2008-10-20
3
286 Views
Last Modified: 2012-05-05
Using ASP/VBscript with an Access data base. One of the items returned in the record set is defined as text and contains this URL value:

http://www.signaturetravelnetwork.com/product/cruise/ship_builder/overview.cfm?product_id=69&sup_id=26&utp=consumer&agency_id=__agency_key__&type=consumer

Before I can use this URL on my web page I need to replace '__agency_key__' with the value 826. How do I manage this?
0
Comment
Question by:travelq13
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 16

Expert Comment

by:brad2575
ID: 22756621
Replace(URLSTring, "__agency_key__", "826")

0
 

Author Comment

by:travelq13
ID: 22759697
I am not really certain how to use this with a value returned in the recordset.
0
 
LVL 16

Accepted Solution

by:
brad2575 earned 250 total points
ID: 22759836
wherever/however you are displaying this on the screen you would use this.

So if you have

Response.write(rs("URLValue"))

You woudl replace it with this:

Response.write(Replace(rs("URLValue"), "__agency_key__", "826")
0

Featured Post

Revamp Your Training Process

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

When trying to find the cause of a problem in VBA or VB6 it's often valuable to know what procedures were executed prior to the error. You can use the Call Stack for that but it is often inadequate because it may show procedures you aren't intereste…
When you see single cell contains number and text, and you have to get any date out of it seems like cracking our heads.
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

728 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question