Wrox Programmer Forums
|
Classic ASP Databases Discuss using ASP 3 to work with data in databases, including ASP Database Setup issues from the old P2P forum on this specific subtopic. See also the book forum Beginning ASP.NET Databases for questions specific to that book. NOT for ASP.NET 1.0, 1.1, or 2.0.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Classic ASP Databases 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 July 1st, 2003, 02:07 AM
Authorized User
 
Join Date: Jul 2003
Posts: 17
Thanks: 0
Thanked 0 Times in 0 Posts
Default Help for Updating the database

I'm a beginner and I want help for Updating my database fields like address, email-id, phone, company name etc from and ASP page.When I press an Update button from an ASP page it should update fields in database.
 
Old May 10th, 2005, 03:13 AM
Authorized User
 
Join Date: May 2005
Posts: 10
Thanks: 0
Thanked 0 Times in 0 Posts
Default

first set your database. then when adding just use RecordsetName.AddNew
RecordsetName("Name of Fields") = "content"
RecordsetName.Update


Here is an example.
<%
strConnect = "Provider=Microsoft.Jet.OLEDB.4.0; Data Source="& _
              Server.MapPath("database.db")
Set objConn = Server.CreateObject("ADODB.Connection")
objConn.open strConnect
Set objRS = Server.CreateObject("ADODB.RecordSet")
objRS.open "test",objConn,2,2


objRS.AddNew
objRS("name") = "Jake Doe"
objRS("age") = "101"
objRS("phone") = "215-000-0000"
objRS.Update

objRS.close
objConn.close
%>





Similar Threads
Thread Thread Starter Forum Replies Last Post
updating database musicradiolive Classic ASP Databases 1 August 17th, 2006 12:23 AM
database not updating ellie BOOK: Beginning ASP 3.0 1 April 16th, 2006 05:28 AM
updating database texasraven ASP.NET 1.x and 2.0 Application Design 2 September 21st, 2004 05:14 PM
Updating a database Gary_M Classic ASP Databases 4 November 7th, 2003 11:03 AM





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