I am trying to dynamically create href links based on database values. The problem occurs with only one field.
Details:[ul][li]MS SQL Server 2000[/li]
[li]Data type: varchar(50) [/li]
[li]Field name: plant[/li]
[li]Generic data sample: XX[single blank space]PlantName[/li]
[li]Examples of data: [/li]
[ol][li]30 East Birmingham[/li]
[li]40 Downtown[/li][/ol][li]Recordset: rs30P_Y[/li][/ul]
Sample code attempts:[ol][li]
[/li]
[li]
[/li][/ol]
In both code examples above the returned value of rs30P_Y cuts off before the blank space and will not print anything I include after the blank space. Result example:
[tt]
[/tt]
However, if I try
, the result is as expected. Example:
Returns
What I want is to dynamically generate [YEAR][PLANTNAME]detail.asp as the link and include values to submit to a stored procedure. So, if someone clicked on plant listing 30 East Birmingham, the link will look similar to:
[tt]
[/tt]
and I could then set variables to pass to the stored procedure to return a result set.
If I am trying something goofy please suggest another method. I don’t expect someone to do the work, just provide some guidance.
Kind Regards,
Krickles
Details:[ul][li]MS SQL Server 2000[/li]
[li]Data type: varchar(50) [/li]
[li]Field name: plant[/li]
[li]Generic data sample: XX[single blank space]PlantName[/li]
[li]Examples of data: [/li]
[ol][li]30 East Birmingham[/li]
[li]40 Downtown[/li][/ol][li]Recordset: rs30P_Y[/li][/ul]
Sample code attempts:[ol][li]
Code:
Response.Write (“<A href=”)
Response.Write “2003”&Cstr(rs30P_Y(“plant”)&”detail.asp”
Response.Write (“></A>”)
[li]
Code:
Response.Write (“<A href=detail?year=”)year(date())&”&plant=”
Response.Write &rs30P_Y(“plant”)&”.asp”
Response.Write (“></A>”)
In both code examples above the returned value of rs30P_Y cuts off before the blank space and will not print anything I include after the blank space. Result example:
[tt]
[/tt]
However, if I try
Code:
Response.Write rs30P_Y(“plant”)
Code:
Response.Write rs30P_Y(“plant”)
Code:
30 East Birmingham
What I want is to dynamically generate [YEAR][PLANTNAME]detail.asp as the link and include values to submit to a stored procedure. So, if someone clicked on plant listing 30 East Birmingham, the link will look similar to:
[tt]
[/tt]
and I could then set variables to pass to the stored procedure to return a result set.
If I am trying something goofy please suggest another method. I don’t expect someone to do the work, just provide some guidance.
Kind Regards,
Krickles