Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > ASP.NET and ASP > ASP 3 Classic ASP Active Server Pages 3.0 > Classic ASP Databases
Password Reminder
| 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 tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old January 30th, 2004, 05:05 PM
Registered User
Join Date: Jan 2004
Location: , , .
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default Unable to change DB values using ASP

Can somebody please tell me why I'm unable to update
an access database using this code:
    Dim ConnectionString
    ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0; Data Source=C:\wedding.mdb"
    Dim Connection
    Set Connection = Server.CreateObject("ADODB.Connection")
    Connection.Open ConnectionString, adOpenDynamic, adLockOptimistic, adCmdText

    Set rs = Server.CreateObject("ADODB.Recordset")
    rs.open "Select * FROM Guests WHERE ID=" & Request("GuestName"), Connection

    If Request.Form("GuestNumber") = 0 Then
        Response.write "<div class='heading'>Don't forget to submit your guest number!</div>"
        If Request.Form("GuestNumber") = 6 Then
            rs("GuestStatus") = 3
            rs("GuestNumber") = Request.Form("GuestNumber")
            rs("GuestStatus") = 1
        End If
    End If

    Set rs = Nothing

    Set Connection = Nothing
I'm getting a server error that the server is unable
to do procedure or some nonsense and the DB changes
are not occurring. I'm able to see the DB and populate
selects and such, just no changin' DB values.
I haven't coded in a few years, did something change
that I should know about?
Reply With Quote
  #2 (permalink)  
Old January 31st, 2004, 01:45 AM
Friend of Wrox
Join Date: Jun 2003
Location: Sydney, NSW, Australia.
Posts: 111
Thanks: 0
Thanked 0 Times in 0 Posts

I would suggest you post the *exact* error message you are receiving.

However, your code appears to be incorrect. Properties like "cursortype", and "locktype" are properties of the *recordset* not the *connection*. You need to open the recordset with an updateable locktype


Microsoft MVP - Windows Server (IIS)
Reply With Quote
  #3 (permalink)  
Old January 31st, 2004, 02:04 PM
Registered User
Join Date: Jan 2004
Location: , , .
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts

Here is my error message:

Technical Information (for support personnel)

Error Type:
ADODB.Recordset (0x800A0CB3)
Current Recordset does not support updating. This may be a limitation of the provider, or of the selected locktype.
/Wedding/reply.asp, line 18

Browser Type:
Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; .NET CLR 1.0.3705; .NET CLR 1.1.4322)

POST 25 bytes to /Wedding/reply.asp

POST Data:

line 18 corresponds with:
rs("GuestNumber") = Request.Form("GuestNumber")
Reply With Quote

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
forgot sa password, unable to change... help happygv SQL Server 2000 14 April 29th, 2010 02:26 AM
values dont show up on ASP page but exist in DB msoul Classic ASP Basics 2 September 3rd, 2008 02:03 PM
Unable to import db The Beginner SQL Server 2000 9 August 24th, 2006 06:03 AM
how to change values in asp:bound field hertendreef ASP.NET 2.0 Professional 3 May 31st, 2006 08:45 AM
how to change values in asp:bound field hertendreef VS.NET 2002/2003 1 May 29th, 2006 06:45 AM

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

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