Thanks Jim,
I expect, like you, that the spaces come from the under-
populated 64-character field.
A parameter is passed when the page is called:
http://www.tirg.org/countydata.asp?county=Coffee
The FP generated code for the results table is:
<%
fp_sQry="SELECT * FROM tncounties WHERE (county
= '::county::')"
fp_sDefault="county="
fp_sNoRecords="<tr><td colspan=2 align=""LEFT""
width=""100%"">No records returned.</td></tr>"
fp_sDataConn="TN-Counties"
fp_iMaxRecords=0
fp_iCommandType=1
fp_iPageSize=0
fp_fTableFormat=True
fp_fMenuFormat=False
fp_sMenuChoice="commelect"
fp_sMenuValue="commelect"
fp_sColTypes="&commelect=131&college=131&county=129&genbudg
et=131&govtemploy=131&highschool=131&hoteltax=131&household
s=131&income=131&landarea=131&maplink=129&population=131&po
verty=131&propertytx=131®voters=131&salestax=131&schbudg
et=131&seat=129&severancet=131&students=131&tnhouse=129&tnj
udiciar=129&tnsenate=129&under18=131&qualified=131&ushouse=
129&voted02=131&voted02epr=131&voted02rpr=131&wheeltax=131&
"
fp_iDisplayCols=2
fp_fCustomQuery=False
BOTID=4
fp_iRegion=BOTID
%>
The field with the URL is maplink, and FP generate this
tag for the data:
<a href="maplink?maplink='<%=FP_FieldURL(fp_rs,"maplink")%
How can I implement the trimming?
-----Original Message-----
Does your FoxPro table always contain the full 64 characters, or is it
variable width?
If it always contain the full 64 characters, that's where your extra spaces
are coming from.
I'm not at all familiar with SQL for FoxPro, but you probably need to do a
custom query such as:
SELECT trim([fieldContainingUrl]) as trimmedUrl, ...
and then use the trimemdURL field to create your URL.
--
Jim Buyens
Microsoft FrontPage MVP
http://www.interlacken.com
Author of:
*----------------------------------------------------
|\---------------------------------------------------
|| Microsoft Office FrontPage 2003 Inside Out
||---------------------------------------------------
|| Web Database Development Step by Step .NET Edition
|| Microsoft FrontPage Version 2002 Inside Out
|| Faster Smarter Beginning Programming
|| (All from Microsoft Press)
|/---------------------------------------------------
*----------------------------------------------------
I have a 64-character field in a Foxpro table which is
displayed in a database results (asp) page. The field
contains a URL. When sent to the browser, it is right
padded with spaces, which doesn't work. How can I trim
those spaces? Thanks.
.