Updating database information

Ask a Question related to ASP Database, Design and Development.

  1. #1

    Default Updating database information

    I am trying to collect information from a form on one page and then pass it
    to the page with the code below for processing. I can get the data to update
    when I use code as below. My problem comes that I want to use the data
    collected in my form in the UPDATE statement. Any assistance would be
    gratefully received.

    <%
    e = Request.Form("eventid")
    d = Request.Form("ddate")
    b = Request.Form("band")
    t = Request.Form("ttime")
    v = Request.Form("venue")
    n = Request.Form("notes")
    c = Request.Form("confirm")


    Set Catalog=Server.CreateObject("ADODB.Recordset")

    Catalog.open "UPDATE tblbookings SET ddate = '13/12/05' WHERE eventID = 11",
    "DSN=calendar"



    %>
    <p>Booking amended.</p>
    <p>Return to <a href="admin.asp">Admin</a> page</p>


    Geoff Wickens Guest

  2. Similar Questions and Discussions

    1. Updating FTP Information for already existing roles
      I have a Contribute 4 site set up with a ton of different access roles set up - I'm hoping I don't have to redo them. Here's my situation. We...
    2. updating database
      I posted this in the general dis part too but maybe this is better place since it has to do with forms... here is my problem I need to overcome....
    3. Selecting/Updating information using command buttons
      I have a simple database that has an area for users to store address information on a "SITE" form. This includes the postcode/zip code,...
    4. Updating Database with ASP
      Hi, I'm just learning how to use ASP and I've been trying to figure out how to add records to my database. I'm learning it out of a book and...
    5. Microsoft Cursor Engine - Insufficient base table information for updating or refreshing.
      Hi, Since my db upgrade from SQL 7 to SQL 2000, one of my MTS objects fails with the error: "0x80004005 Microsoft Cursor Engine - Insufficient...
  3. #2

    Default Re: Updating database information

    The code I am trying to use is:

    <%
    e = Request.Form("eventid")
    d = Request.Form("ddate")
    b = Request.Form("band")
    t = Request.Form("ttime")
    v = Request.Form("venue")
    n = Request.Form("notes")
    c = Request.Form("confirm")


    Set Catalog=Server.CreateObject("ADODB.Recordset")

    Catalog.open "UPDATE tblbookings SET ddate =" & d & " WHERE eventID =" & e,
    "DSN=calendar"



    %>
    <p>Booking amended.</p>
    <p>Return to <a href="admin.asp">Admin</a> page</p>

    "Geoff Wickens" <gwickens@hotmail.com> wrote in message
    news:wwo3b.971$Ah5.432@newsfep1-gui.server.ntli.net...
    > I am trying to collect information from a form on one page and then pass
    it
    > to the page with the code below for processing. I can get the data to
    update
    > when I use code as below. My problem comes that I want to use the data
    > collected in my form in the UPDATE statement. Any assistance would be
    > gratefully received.
    >
    > <%
    > e = Request.Form("eventid")
    > d = Request.Form("ddate")
    > b = Request.Form("band")
    > t = Request.Form("ttime")
    > v = Request.Form("venue")
    > n = Request.Form("notes")
    > c = Request.Form("confirm")
    >
    >
    > Set Catalog=Server.CreateObject("ADODB.Recordset")
    >
    > Catalog.open "UPDATE tblbookings SET ddate = '13/12/05' WHERE eventID =
    11",
    > "DSN=calendar"
    >
    >
    >
    > %>
    > <p>Booking amended.</p>
    > <p>Return to <a href="admin.asp">Admin</a> page</p>
    >
    >

    Geoff Wickens Guest

Posting Permissions

  • You may not post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139