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 August 16th, 2003, 02:33 AM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 518
Thanks: 0
Thanked 0 Times in 0 Posts
Default update problem in asp

How can update two tables in asp ?
It not updates the two tables at a time,
Following error message received.

Error Type:
Microsoft OLE DB Provider for SQL Server (0x80040E14)
Invalid column name 'sect_area'.
/pweb/tp_drawings/dwg_edit3.asp, line 53

<%
usql1="update drawings set "
usql2="name='"& name &"',"
usql3="date_recd='"& date_recd &"',"
usql4="dtype='"& dtype &"',"
usql5="location='"& location &"' ,"
usql6="update sectors set "
usql7="name='"& name &"',"
usql8="sect_area='"& sect_area &"',"
usql9="loc_type='"& loc_type &"' where loc_type='" &loc_type& "' "


usql=usql1+usql2+usql3+usql4+usql5+squl6+usql7+usq l8+usql9

cn.execute usql // line 53 where sect_area columne name is correct

 if err.number=0 then
 Response.write("Record Edited")
 else
 Response.Write("Error found")
 end if

%>

where connection with the database is ok
Please help to solve above coding.

Mateen
[email protected]
 
Old August 17th, 2003, 06:47 PM
Authorized User
 
Join Date: Jun 2003
Posts: 97
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to planeswalk
Default

Hi,

You need to give more information so we can where the problem lies in your code. I suggest that you print your usql statement on screen through Response.Write. This way you will be able to see if the problem is in your SQL or somewhere else.

Cheers!


Marlon Villarama
Support Team
Web Burner Hosting
[email protected]
www.webburner.com
Toll-Free: 877-535-2876
 
Old August 18th, 2003, 03:24 AM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 1,212
Thanks: 0
Thanked 1 Time in 1 Post
Default

Multiple statements should be separated by a ;
so change to this
Code:
usql5="location='"& location &"' ;"
 
Old August 18th, 2003, 03:43 AM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 518
Thanks: 0
Thanked 0 Times in 0 Posts
Default

thanks


Quote:
quote:Originally posted by pgtips
 Multiple statements should be separated by a ;
so change to this
Code:
usql5="location='"& location &"' ;"





Similar Threads
Thread Thread Starter Forum Replies Last Post
Update Scoreboard - ASP cancer10 Classic ASP Databases 1 October 24th, 2006 08:28 AM
ASP UPDATE CLOB mamasagarika Classic ASP Databases 0 December 2nd, 2004 07:14 AM
update using Asp and jscript alyeng2000 Classic ASP Basics 12 November 13th, 2003 09:38 PM





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