splitting lines of code

B

Brian

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.
 
A

Aaron Bertrand - MVP

stringValue = " ... long line ... " & _
" ... another line ... " & _
" ... another line ... "
 
T

Tim Slattery

Brian said:
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")
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,579
Members
45,053
Latest member
BrodieSola

Latest Threads

Top