Wrox Programmer Forums
|
ASP Pro Code Clinic As of Oct 5, 2005, this forum is now locked. No posts have been deleted. Please use "Classic ASP Professional" at: http://p2p.wrox.com/forum.asp?FORUM_ID=56 for discussions similar to the old ASP Pro Code Clinic or one of the other many remaining ASP and ASP.NET forums here.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP Pro Code Clinic section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old November 18th, 2003, 03:40 AM
Registered User
 
Join Date: Nov 2003
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default HELP, ASP code or line BREAK

I have a problem regarding an asp break. i dont exactly what to call it, but i get an error message like UNTERMINATED STRING.

you see i have a script an SQL

its like

strQuery= "INSERT INTO tabelename(lastname, address.............)
values ('"&a_lastname&"', '"&a_lastname&"',..........)"

as you can see the code should be in one line only, but because the code is too long the editor brings down the exceeding code. I have tried it in dreamweaver, notepad but it still brings down the exceeding line. i think there is a connector to join the frist and second line.

thank you very much.
 
Old November 18th, 2003, 09:45 AM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 231
Thanks: 0
Thanked 0 Times in 0 Posts
Default

If your code needs to span over several lines, however it should all execute as one line then use an ampersand followed by a space followed by an underscore (& _) at the end of the line before beginning the next line. For example, change your code to look like this:
Code:
strQuery= "INSERT INTO tabelename(lastname, address.............) " & _
"values ('"&a_lastname&"', '"&a_lastname&"',..........)"
Notice that you have to close the string before using & _ and then open the string again on the next line.

Regards
Owain Williams





Similar Threads
Thread Thread Starter Forum Replies Last Post
line break Cyber Shiva HTML Code Clinic 1 May 17th, 2007 06:04 AM
line break problem XSLT 1 February 20th, 2006 11:18 AM
Extra line Break kanchan_b XSLT 1 February 3rd, 2006 09:11 AM
break up line crmpicco Javascript How-To 1 June 6th, 2005 06:54 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.