ASP Programming
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Iron Speed
Go Back   Dev Shed ForumsProgramming Languages - MoreASP Programming

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
1200+ fellow developers rate and compare features of the top IDEs, like Visual Studio, Eclipse, RAD, Delphi and others, across 13 categories. Enjoy this FREE Download of the IDE User Satisfaction Study by Evans Data Corporation. Download Now!
  #1  
Old August 4th, 2003, 02:29 PM
Digitalosophy Digitalosophy is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jul 2003
Posts: 74 Digitalosophy User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 11 h 25 m 20 sec
Reputation Power: 6
Question Trouble with multiple updates

grrr sry for being such a pest


my syntax is wrong and it's really getting agravating

Code:
<% SQL = "UPDATE IM " & _
    "SET FirstName = '" & fname & "' " & _
    "WHERE ID = " & ID %>


that works fine, but now i am trying to

Code:
<% SQL = "UPDATE IM " & _
    "SET FirstName, LastName, Mobile = '" & fname & "','" & lname & "','" & mobile & "' " & _
    "WHERE ID = " & ID %>


Thanks

Reply With Quote
  #2  
Old August 4th, 2003, 02:43 PM
Vlince Vlince is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jun 2003
Location: Canada, Quebec, Montreal
Posts: 410 Vlince User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 6
UPDATE tablename
SET Field1 = value1, Field2 = value2, ...
WHERE your where clause


Hope this helps!
Sincerely

Vlince

Reply With Quote
  #3  
Old August 5th, 2003, 12:06 AM
Digitalosophy Digitalosophy is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jul 2003
Posts: 74 Digitalosophy User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 11 h 25 m 20 sec
Reputation Power: 6
ahhh yes it does. i was trying

UPDATE table
SET name, age, email = blah, blah , blah

doh Thanks!

Reply With Quote
  #4  
Old August 5th, 2003, 09:42 AM
Digitalosophy Digitalosophy is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jul 2003
Posts: 74 Digitalosophy User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 11 h 25 m 20 sec
Reputation Power: 6
grrrrrr
Code:
<% SQL = "UPDATE IM SET Firstname = '" & fname & "', LastName = '" & lname & "' WHERE ID = " &ID %>


damn still not working

Reply With Quote
  #5  
Old August 5th, 2003, 09:45 AM
Digitalosophy Digitalosophy is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jul 2003
Posts: 74 Digitalosophy User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 11 h 25 m 20 sec
Reputation Power: 6
well to answer my own question i forgot to request the lname variable, thanks all

Reply With Quote
  #6  
Old August 5th, 2003, 09:54 AM
Vlince Vlince is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jun 2003
Location: Canada, Quebec, Montreal
Posts: 410 Vlince User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 6
That's why you should get use to make a Response.Write of your SQL Query *BEFORE* you actually execute it.

Its a habit I got and really helped me in the past.

<%
. . .
. .
.
strSql = "..........."
'FOR DEBUG ONLY
'Response.Write strSql & "<hr>"
'Response.End

objConn.Execute strSql
.
. .
. . .
%>

Hope this helps!
Sincerely

Vlince

Reply With Quote
  #7  
Old August 5th, 2003, 10:20 AM
Digitalosophy Digitalosophy is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jul 2003
Posts: 74 Digitalosophy User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 11 h 25 m 20 sec
Reputation Power: 6
good point

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming Languages - MoreASP Programming > Trouble with multiple updates


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 1 hosted by Hostway