executing SQL query using ASP?

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

  1. #1

    Default executing SQL query using ASP?

    Hi,

    I've got the following problem and I don't know how to make this (if
    it's possible at all):

    I want to make a form where the user can enter a criteria and then,
    after pushing a button or link, a certain table in a certain DB is
    updated. So it's not about updating a single record, but a whole table!
    The single update is no problem using Dreamweaver for example.

    What I want in fact is simply execute an SQL update query ...

    Any help is appreciated

    Jerome Guest

  2. Similar Questions and Discussions

    1. Error Executing Database Query
      I have a website, which is visited by 18.000 unique users a day, who view almost 900.000 pages As you can see, one user views a lot of pages....
    2. Error Executing Database Query.
      The error occurred in C:\CFusionMX7\wwwroot\CFIDE\gettingstarted\tutorial\index.cfm: line 2 2 : <cfquery name="atrwork"...
    3. error executing database query on login
      I've noticed we started getting this message when you try to Login to the website. We have recently just installed the CF standard edition 7.0 We...
    4. another Error executing database query
      Just when I thought I had all my forms finely tuned, I get the error below, which has me stumped (using DrmWeaver 2004, CF7, mysql): Error...
    5. Asynchronously executing query ?
      I have been searching for an anser to this but it seems it is not a commonly used technique. If I execute a long running sp or query...
  3. #2

    Default Re: executing SQL query using ASP?

    Open a connection using ADO
    execute the Query againest your statement.


    --
    Roji. P. Thomas
    SQL Server Programmer ;)
    ________________________
    "Jerome" <jherr@NOSPAM.mnhn.lu> wrote in message
    news:uZMTumAsDHA.4060@TK2MSFTNGP11.phx.gbl...
    > Hi,
    >
    > I've got the following problem and I don't know how to make this (if
    > it's possible at all):
    >
    > I want to make a form where the user can enter a criteria and then,
    > after pushing a button or link, a certain table in a certain DB is
    > updated. So it's not about updating a single record, but a whole table!
    > The single update is no problem using Dreamweaver for example.
    >
    > What I want in fact is simply execute an SQL update query ...
    >
    > Any help is appreciated
    >

    Roji. P. Thomas Guest

  4. #3

    Default Re: executing SQL query using ASP?

    On Fri, 21 Nov 2003 09:29:55 +0100, Jerome <jherr@NOSPAM.mnhn.lu>
    wrote:
    >I've got the following problem and I don't know how to make this (if
    >it's possible at all):
    >
    >I want to make a form where the user can enter a criteria and then,
    >after pushing a button or link, a certain table in a certain DB is
    >updated. So it's not about updating a single record, but a whole table!
    >The single update is no problem using Dreamweaver for example.
    >
    >What I want in fact is simply execute an SQL update query ...
    Well, stop using Dreamweaver and it's simple. :)

    Okay, bad dig. This is simply normal ASP/ADO stuff. Open an ADO
    connection, and run the query on that connection. Something along the
    lines of:

    (Access Database)

    dbConnect = "PROVIDER=Microsoft.Jet.OLEDB.4.0;DATA SOURCE=" &
    Server.MapPath("database.mdb") & ";"
    set Connect = server.CreateObject("ADODB.Connection")
    Connect.Open dbConnect
    strSQL = "UPDATE table SET field = 'New Data'"
    Connect..Execute (strSql)

    As long as you know how to create the SQL query, it's not a big deal
    to do the rest.

    For other ADO connections such as to SQl Server, look at:

    [url]http://www.able-consulting.com/ADO_Conn.htm[/url]

    Jeff
    Jeff Cochran 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