Velocity Reviews

Velocity Reviews (http://www.velocityreviews.com/forums/index.php)
-   ASP General (http://www.velocityreviews.com/forums/f65-asp-general.html)
-   -   splitting lines of code (http://www.velocityreviews.com/forums/t792805-splitting-lines-of-code.html)

Brian 01-20-2004 11:20 PM

splitting lines of code
 
if i wanted to split the below SQL statement on two lines, what would the
syntax be....

SQL = "UPDATE gallery WHERE g_id = " & Request.Form("g_id") &
"SET g_name = " &
Request.Form("g_name") &
"g_add = " &
Request.Form("g_add") "


thanks, brian.



Aaron Bertrand - MVP 01-20-2004 11:52 PM

Re: splitting lines of code
 
stringValue = " ... long line ... " & _
" ... another line ... " & _
" ... another line ... "

--
Aaron Bertrand
SQL Server MVP
http://www.aspfaq.com/




"Brian" <quigleyb@iol.ie> wrote in message
news:bukd8q$jig$1@kermit.esat.net...
> if i wanted to split the below SQL statement on two lines, what would the
> syntax be....
>
> SQL = "UPDATE gallery WHERE g_id = " & Request.Form("g_id") &
> "SET g_name = " &
> Request.Form("g_name") &
> "g_add = " &
> Request.Form("g_add") "
>
>
> thanks, brian.
>
>




Tim Slattery 01-21-2004 01:42 PM

Re: splitting lines of code
 
"Brian" <quigleyb@iol.ie> wrote:

>if i wanted to split the below SQL statement on two lines, what would the
>syntax be....
>
>SQL = "UPDATE gallery WHERE g_id = " & Request.Form("g_id") &
> "SET g_name = " &
>Request.Form("g_name") &
> "g_add = " &
>Request.Form("g_add") "


This is apparently VBScript, so the line continuation character is an
underscore:

SQL = "UPDATE gallery WHERE g_id = " & Request.Form("g_id") & _
"SET g_name = " & Request.Form("g_name") & _
"g_add = " & Request.Form("g_add")

--
Tim Slattery
MS MVP(DTS)
Slattery_T@bls.gov


All times are GMT. The time now is 10:28 AM.

Powered by vBulletin®. Copyright ©2000 - 2014, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.