sign in | join about | help | sitemap
Connecting Tech Pros Worldwide
JPRW's Avatar

Issue with a variable form a database.


Question posted by: JPRW (Guest) on July 19th, 2005 02:17 PM
Hello All.

I am having issues with the visualbasic gramatic for the following scenario:

I am retrieving information from an Access 2000 Database. The current fields
are:

ebay, which is a yes / no, showing as -1 or 0
ebay_path, which is a memo field with the ebay link to the product
auctioned.

within the HTML code, I have the following code:


----------------------------------------------------------------------------
---
<%
if elbadet.Fields.Item("ebay").Value = -1 then
<a href="<%=(elbadet.Fields.Item("ruta_ebay").Value)%>" target="_blank"><img
src="images/content/ebay_auctions.gif" width="296" height="43" border="0">
else
<img src="images/content/ebay_auctions_inactive.gif" width="296" height="43"
border="0">
end if
%>
----------------------------------------------------------------------------
---
where
elbadet is the name of the recordset
ebay is the field having the value
ruta_ebay is the other field with the path


Once previewed :is giving me the following error

HTTP 500.100 - Internal Server Error - ASP error
Internet Information Services

----------------------------------------------------------------------------
----

Technical Information (for support personnel)

a.. Error Type:
Microsoft VBScript compilation (0x800A0400)
Expected statement
/lacany/TMP6hxrg14ri3.asp, line 62
<a href="<%=(elbadet.Fields.Item("ruta_ebay").Value)


b.. Browser Type:
Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0)

c.. Page:
GET /lacany/TMP6hxrg14ri3.asp

d.. Time:
Monday, July 19, 2004, 11:10:52 PM


e.. More information:
Microsoft Support
--------------------------------------------------------------------------
In plain english I need the statement to behave something like this
(pseudocode)

If the specified filed = -1 then show the active gif image and the link
else
show the inactive gif image
end if statent


Thanks in advance; any help is highly appreciated.

Juan Pablo Rojas
merca-web.com


4 Answers Posted
Catalyst's Avatar
Guest - n/a Posts
#2: Re: Issue with a variable form a database.

"JPRW" <jprojas@earthlink.net> wrote in
news:960Lc.8840$Qu5.1358@newsread2.news.pas.earthl ink.net:
[color=blue]
> Hello All.
>
> I am having issues with the visualbasic gramatic for the following
> scenario:
>
> I am retrieving information from an Access 2000 Database. The current
> fields are:
>
> ebay, which is a yes / no, showing as -1 or 0
> ebay_path, which is a memo field with the ebay link to the product
> auctioned.
>
> within the HTML code, I have the following code:
>
>
> ----------------------------------------------------------------------[/color]
-[color=blue]
> ----- ---
> <%
> if elbadet.Fields.Item("ebay").Value = -1 then
> <a href="<%=(elbadet.Fields.Item("ruta_ebay").Value)%>"
> target="_blank"><img src="images/content/ebay_auctions.gif"
> width="296" height="43" border="0"> else
> <img src="images/content/ebay_auctions_inactive.gif" width="296"
> height="43" border="0">
> end if
> %>
> ----------------------------------------------------------------------[/color]

Take out the ( ) around the memo being writen out.

<a href="<%=(elbadet.Fields.Item("ruta_ebay").Value)%>"

should be

<a href="<%= elbadet.Fields.Item("ruta_ebay").Value %>"


--
Catalyst
www.webforumz.com
Free Web Design and Development Help, Discussions, tips and Critique!
ASP, VB, .NET, SQL, CSS, HTML, Javascript, Flash, XML, SEO !
Rob Collyer's Avatar
Guest - n/a Posts
#3: Re: Issue with a variable form a database.

>[color=blue]
> Take out the ( ) around the memo being writen out.
>
> <a href="<%=(elbadet.Fields.Item("ruta_ebay").Value)%>"
>
> should be
>
> <a href="<%= elbadet.Fields.Item("ruta_ebay").Value %>"
>
>[/color]

I think catalyst is just saying that the extra brackets are not needed.

--
Robert Collyer
www.webforumz.com
Free Web Design and Development Help, Discussions, tips and Critique!
ASP, VB, .NET, SQL, CSS, HTML, Javascript, Flash, XML, SEO !
JP SIngh's Avatar
Guest - n/a Posts
#4: Re: Issue with a variable form a database.

Try

<a href="<%= elbadet.Fields.Item('ruta_ebay').Value %>"


"Rob Collyer" <webforumz@webforumz.com> wrote in message
news:Xns952C648607420webforumzwebforumzco@217.32.2 52.50...[color=blue][color=green]
> >
> > Take out the ( ) around the memo being writen out.
> >
> > <a href="<%=(elbadet.Fields.Item("ruta_ebay").Value)%>"
> >
> > should be
> >
> > <a href="<%= elbadet.Fields.Item("ruta_ebay").Value %>"
> >
> >[/color]
>
> I think catalyst is just saying that the extra brackets are not needed.
>
> --
> Robert Collyer
> www.webforumz.com
> Free Web Design and Development Help, Discussions, tips and Critique!
> ASP, VB, .NET, SQL, CSS, HTML, Javascript, Flash, XML, SEO ![/color]


Rob Collyer's Avatar
Guest - n/a Posts
#5: Re: Issue with a variable form a database.

I think Catalyst just means the brackets are un-needed.

--
Rob Collyer - www.webforumz.com
Web design and development forums for Free help, advice,
tips, and website critique by professional designers and developers.



"Catalyst" <webforumz@webforumz.com> wrote in message
news:Xns952C10E65FAwebforumzwebforumzco@66.75.162. 198...[color=blue]
> "JPRW" <jprojas@earthlink.net> wrote in
> news:960Lc.8840$Qu5.1358@newsread2.news.pas.earthl ink.net:
>[color=green]
> > Hello All.
> >
> > I am having issues with the visualbasic gramatic for the following
> > scenario:
> >
> > I am retrieving information from an Access 2000 Database. The current
> > fields are:
> >
> > ebay, which is a yes / no, showing as -1 or 0
> > ebay_path, which is a memo field with the ebay link to the product
> > auctioned.
> >
> > within the HTML code, I have the following code:
> >
> >
> > ----------------------------------------------------------------------[/color]
> -[color=green]
> > ----- ---
> > <%
> > if elbadet.Fields.Item("ebay").Value = -1 then
> > <a href="<%=(elbadet.Fields.Item("ruta_ebay").Value)%>"
> > target="_blank"><img src="images/content/ebay_auctions.gif"
> > width="296" height="43" border="0"> else
> > <img src="images/content/ebay_auctions_inactive.gif" width="296"
> > height="43" border="0">
> > end if
> > %>
> > ----------------------------------------------------------------------[/color]
>
> Take out the ( ) around the memo being writen out.
>
> <a href="<%=(elbadet.Fields.Item("ruta_ebay").Value)%>"
>
> should be
>
> <a href="<%= elbadet.Fields.Item("ruta_ebay").Value %>"
>
>
> --
> Catalyst
> www.webforumz.com
> Free Web Design and Development Help, Discussions, tips and Critique!
> ASP, VB, .NET, SQL, CSS, HTML, Javascript, Flash, XML, SEO ![/color]


 
Not the answer you were looking for? Post your question . . .
197,003 members ready to help you find a solution.
Join Bytes.com

What is Bytes?

We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights. Get the best answers to your questions from over 197,003 network members.
Post your question now . . .
It's fast and it's free

Popular Articles

Top Community Contributors