Wrox Programmer Forums

Need to download code?

View our list of code downloads.

| FAQ | Members List | Search | Today's Posts | Mark Forums Read
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
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old August 23rd, 2004, 10:10 AM
Registered User
 
Join Date: Aug 2004
Location: , , .
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



Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


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 ponywang@hotmail.com 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



All times are GMT -4. The time now is 09:04 PM.


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