Results 1 to 3 of 3

Thread: Download

  1. #1

    Thread Starter
    Lively Member nutstretch's Avatar
    Join Date
    May 2000
    Location
    UK
    Posts
    85

    Download

    I am trying to add data to a database when i click the submit button i am asked to download the asp instead of it actually doing the code what is going wrong please:
    <html>
    <table>
    <tr><td>name</td><td>address</td></tr>
    <% @language=vbscript %>
    <!--#include file="adovbs.inc"-->
    <%
    dim conn, rs
    dim strQ



    dim txtsurname
    txtsurname = request.querystring("surname")
    dim txtinitials
    txtinitials =request.querystring("initials")
    dim txtAdd1
    txtAdd1 =request.querystring("Address1")
    dim txtAdd2
    txtAdd2=request.querystring("Address2")
    dim txtcity
    txtcity =request.querystring("City")
    dim txtpost
    txtpost =request.querystring("Post Code")
    dim txtHmphone
    txtHmphone =request.querystring("Home Telephone")
    dim txtMoby
    txtMoby =request.querystring("Mobile Telephone")
    dim txtemail
    txtemail =request.querystring("email")
    dim txtFee
    txtFee =request.querystring("Fee")


    set conn=server.CreateObject("ADODB.connection")
    conn.Open "DRIVER=Microsoft Access Driver (*.mdb) ; DBQ=" & Server.MapPath("heenaA1")

    set rs = server.CreateObject ("ADODB.Recordset")
    strQ = "Select * from webBooking"

    rs.Open strQ, conn, adOpenDynamic, adLockOptimistic, adCmdText
    rs.AddNew
    rs("surname")= txtsurname
    rs("initials")= txtinitials
    rs("Address1")= txtAdd1
    rs("Address2")= txtAdd2
    rs("City")= txtcity
    rs("PostCode")= txtpost
    rs("HomeTelephone")= txtHmphone
    rs("MobileTelephone")= txtMoby
    rs("email")=txtemail

    rs("Fee")= txtFee
    rs.Update
    rs.Close


    response.write "Record added"
    Conn.close
    %>

    </html>
    if at first you don't succeed, drink the rest of the bottle and loop to the same place tomorrow

  2. #2
    Frenzied Member
    Join Date
    Aug 2000
    Posts
    1,539
    are you running the asp page on a IIS serveR?
    if you dont have IIS server it will ask you to download it

  3. #3
    Good Ol' Platypus Sastraxi's Avatar
    Join Date
    Jan 2000
    Location
    Ontario, Canada
    Posts
    5,134
    Look on your other thread here nutstretch, I answered this question there.
    All contents of the above post that aren't somebody elses are mine, not the property of some media corporation.
    (Just a heads-up)

Posting Permissions

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



Click Here to Expand Forum to Full Width