Code Comments

Programming Forum and web based access to our favorite programming groups.
For Programmers: Free Programming Magazines | New: Database administration forum
Registration is free! Edit your profileCalendarFind other membersFrequently Asked QuestionsSearch -> 
Post New Thread











Thread
Author

syntax issues
I have the following. I've tried swapping the " and ' in and around and
can't get the right syntax.

<%
varA = "<a href=" & "article.asp?id=" & (rsHead.Fields.Item("ID").Value) &
">Article</a>"
%>

My end results are: Type mismatch: '[string: "<a href=article.asp?"]'

Can someone lend a thought?
thanks



Report this thread to moderator Post Follow-up to this message
Old Post
shank
10-29-04 01:55 AM


Re: syntax issues
<%
varA = "<a href='article.asp?id=" & rsHead.Fields.Item("ID").Value & "'>Arti
cle</a>"
%>

'dlbjr
'Pleading sagacious indoctrination!



Report this thread to moderator Post Follow-up to this message
Old Post
dlbjr
10-29-04 01:55 AM


Re: syntax issues
Nope...
Type mismatch: '[string: "<a href='article.asp"]'
thanks


"dlbjr" <oops@iforgot.com> wrote in message
news:enjYsbUvEHA.1404@TK2MSFTNGP11.phx.gbl...
> <%
> varA = "<a href='article.asp?id=" & rsHead.Fields.Item("ID").Value &
> "'>Article</a>"
> %>
>
> 'dlbjr
> 'Pleading sagacious indoctrination!
>
>



Report this thread to moderator Post Follow-up to this message
Old Post
shank
10-29-04 01:55 AM


Re: syntax issues
<%
strData = rsHead.Fields.Item("ID").Value
Response.Write strData & "<BR>"
Response.Flush
If Len(strData) > 0 Then
varA = "<a href='article.asp?id=" & rsHead.Fields.Item("ID").Value & "'>Arti
cle</a>"
End If
%>

This will let you see what is returned
--
'dlbjr
'Pleading sagacious indoctrination!



Report this thread to moderator Post Follow-up to this message
Old Post
dlbjr
10-29-04 01:55 AM


Re: syntax issues
Did you copy and paste that from your ASP file?  And are you that that is
the line in error?  I don't see anything syntactically incorrect.

Try:

<%
varA = "<a href=""article.asp?id=" & rsHead.Fields.Item("ID").Value &
""">Article</a>"
%>

Ray at home


"shank" <shank@tampabay.rr.com> wrote in message
news:ey6pjSUvEHA.3376@TK2MSFTNGP12.phx.gbl...
>I have the following. I've tried swapping the " and ' in and around and
>can't get the right syntax.
>
> <%
> varA = "<a href=" & "article.asp?id=" & (rsHead.Fields.Item("ID").Value) &
> ">Article</a>"
> %>
>
> My end results are: Type mismatch: '[string: "<a href=article.asp?"]'
>
> Can someone lend a thought?
> thanks
>



Report this thread to moderator Post Follow-up to this message
Old Post
Ray Costanzo [MVP]
10-29-04 01:55 AM


RE: syntax issues
Try loosing the db field and build the string with a dummy value, also all
variables in ASP are variants so you may need to perform a CSTR on the db
field, ie:

<%
Dim varA
'..With dummy value
varA = "<a href='article.asp?id=1'>Article</a>"

'..Then maybe
varA = "<a href='article.asp?id=" & CStr("" &
rsHead.Fields.Item("ID").Value) & "'>Article</a>"
%>

Hope this is helpful,

Stephen.

.


"shank" wrote:

> I have the following. I've tried swapping the " and ' in and around and
> can't get the right syntax.
>
> <%
> varA = "<a href=" & "article.asp?id=" & (rsHead.Fields.Item("ID").Value) &
> ">Article</a>"
> %>
>
> My end results are: Type mismatch: '[string: "<a href=article.asp?"]'
>
> Can someone lend a thought?
> thanks
>
>
>

Report this thread to moderator Post Follow-up to this message
Old Post
StephenMcC
10-29-04 01:55 PM


Sponsored Links




Last Thread Next Thread Next
Search this forum -> 
Post New Thread

ASP archive

Show a Printable Version Send to friend Email This Page to Someone! subscribe to this thread Receive updates to this thread
Computer Consultants
Programming Jobs
Visual Basic Controls
SQL Server Programming
Webservices
Java Security
Visual Studio
C# Programming
Visual J++
Software engineering
Open source Software
Perl Programming
PHP Programming
ASP Programming
ASP .NET Programming
Visual Basic Programming
Windows Scripting Host
Java Programming
Java Help
Java Beans
VBScript
Cobol
MAC Applications
Unix Programming
Forum Jump:
All times are GMT. The time now is 05:15 AM.

 
Free MCSE Braindumps | Real Estate Topics

Programming forum archive

Copyrights CodeComments.com 2004 - 2006

Powered by vBulletin Copyright 2000-2006 Jelsoft Enterprises Limited.