Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Dynamic Web Page (VBScript and SQL)

Status
Not open for further replies.

majohnson

Technical User
Jun 28, 2000
6
US
&lt;%UserID= &quot;'&quot; & Request.Form(&quot;UserID&quot;) & &quot;'&quot;<br>name=Request.Form(&quot;name&quot;)<br>%&gt;<br><br>SQL= &quot;SELECT LNK_NM, LNK_DSPL FROM EPIC_LINK WHERE LNK_USER = &quot; & UserID + LNK_NM = &quot; & name<br><br>I am not able the update the LNK_NM AND LNK_DSPL.&nbsp;&nbsp;I have an error that looks like this:<br><br>Microsoft VBScript compilation error '800a0409' <br><br>Unterminated string constant <br><br>/epic/MyLink_Update2.asp, line 33 <br><br>SQL= &quot;SELECT LNK_NM, LNK_DSPL FROM EPIC_LINK WHERE LNK_USER = &quot; & UserID + LNK_NM = &quot; & name<br>--------------------------------------------------------------------------------------------^<br><br>Can someone please help me??<br>Thanks<br><br>
 
try this<br><br>SQL= &quot;SELECT LNK_NM, LNK_DSPL FROM EPIC_LINK WHERE<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;LNK_USER = &quot; & UserID + LNK_NM = '&quot; & name & &quot;'&quot;<br><br>u must give quote for string values<br><br>Thanks<br><br>Sandeep
 
I'm not sure why you're talking about update when your sql statement is simple select. And talking about &quot;select&quot;, your string, I suppose, should look like this one:<br><br>SQL= &quot;SELECT LNK_NM, LNK_DSPL FROM EPIC_LINK WHERE LNK_USER = &quot; & UserID & &quot;and LNK_NM = '&quot; & name & &quot;'&quot;<br><br>
 
If your LNK_USER has a combined value you should use a string :<br><b>SQL= &quot;SELECT LNK_NM, LNK_DSPL FROM EPIC_LINK WHERE LNK_USER = '&quot; & cstr(UserID) & name & &quot;'&quot;<br><br><br>
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top