Products 
ASP Source Control
FingerTips
Link Demon
netPROFIT Lite
ASP Knowledge Base
Display your PageRank™
 myLoudASP 
Username
Password
 Latest News 
LoudASP Source Control 2004 released
LoudASP today released the latest update to o...
[Mar 5 2004]

LoudASP introduces upgrade pricing
Today we have introduced upgrade pricing for ...
[Jun 14 2003]

Link Demon 2003 Service Pack 2 Released
LoudASP today released the latest update to o...
[May 18 2003]

 Hot Links 
Banner Exchange Script
Link Exchange Software
Subscription Software
Online Website Builder
Homepage Hosting Scripts
Website Builder
  Home | About Us | Contact Us | myLoudASP | Our News | Our Products | Our Support | Our Sitemap

LoudASP Knowledge Base - ASP and Database
Active Server Page knowledge dealing with databases

Easy SQL Help (Update)

Updating records in a database via SQL is simple once you get the hang of it.

SQLUpdate = "Update MYTABLE "
SQLUpdate = SQLUpdate & "SET MyColumn1 = '" & VAR1 & "',"
SQLUpdate = SQLUpdate & "MyColumn2 = '" & VAR2 & "' "
SQLUpdate = SQLUpdate & " where ID = '" & VAR_ID & "'"

This code will take VAR1, VAR2 and update the records located at MyColumn1 and MyColumn2 where ever the ID column equals VAR_ID.

Some thing to remember
The first line needs to be: Update YourTable
The second line needs to be: Set Column to something
The second to the last line need to end with a space not a comma


You could take this code above change the variables and drop it into a database connection execution statment: conntemp.execute(SQLUpdate)

Please help us improve our service by rating this FAQ.
1 = poor to 5 = very good
1   2   3   4   5  

This FAQ has been read 9077 times.


How to Connect to a Database (DSNLESS)

Easy SQL How To (Insert)

Easy SQL Help (Update)

Easy SQL Help (Delete)

Easy SQL Apostrophes Bug Fix

Easy How To SQL (Select)

Database test for no records

 


Home | About Us | Contact Us | myLoudASP | Our News | Our Products | Our Support | Site Map | Resources | Additional Resources
Copyright © 1999 - 2006 LoudASP. All Rights Reserved.