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

Re: executing SQL query using ASP? by Roji

Roji
Fri Nov 21 06:47:40 CST 2003

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
>



Re: executing SQL query using ASP? by jcochran

jcochran
Fri Nov 21 07:07:38 CST 2003

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:

http://www.able-consulting.com/ADO_Conn.htm

Jeff