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 August 23rd, 2004, 10:10 AM
Registered User
 
Join Date: Aug 2004
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Default Addnew with oracle

Hello,
I am using Oracle. I have a table with colume ID. I want to add sequence number to my ID when ever new record is added to the table. I have also created sequence in oracle.

Can someone help me on how to add a new record with ID incremented based on sequence in Oracle.

My code (without ID) is
Set rs = Server.CreateObject("ADODB.Recordset")
        rs.ActiveConnection = dbconn
        rs.CursorType = adOpenKeyset
        rs.LockType = adLockOptimistic
        rs.Source = "SHAHP.Project"
        rs.Open
        If Not IsEmpty(Request.Form) Then
            rs.AddNew
            rs("title") = Request.form("title")
                        rs("owner") = Request.form("owner")
                        rs.Update
            rs.MoveFirst
           End If








Similar Threads
Thread Thread Starter Forum Replies Last Post
Help regarding Addnew Kaustav Classic ASP Databases 8 January 10th, 2010 06:33 PM
AddNew with SQL Server... neo_jakey Classic ASP Databases 0 April 16th, 2008 01:26 PM
addnew problem [email protected] Classic ASP Basics 6 February 24th, 2004 01:08 AM
.addnew for Ado.net? paulwalker ADO.NET 1 September 20th, 2003 10:17 AM
addnew method jesuseyi Classic ASP Databases 1 August 27th, 2003 02:46 AM





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