473,387 Members | 1,517 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

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

Jul 19 '05 #1
2 20253
Open a connection using ADO
execute the Query againest your statement.
--
Roji. P. Thomas
SQL Server Programmer ;)
________________________
"Jerome" <jh***@NOSPAM.mnhn.lu> wrote in message
news:uZ**************@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

Jul 19 '05 #2
On Fri, 21 Nov 2003 09:29:55 +0100, Jerome <jh***@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
Jul 19 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
by: Rick Caborn | last post by:
Does anyone know of a way to execute sql code from a dynamically built text field? Before beginning, let me state that I know this db architecture is built solely for frustration and I hope to...
0
by: tukaram.thatikonda | last post by:
Hi Guys, I have written a small windows application in VB.Net to test ADO.Net performance while executing long running query. The query works most of the time but fails sometime. I am trying...
10
by: Heiko Pliefke | last post by:
Hi NG! I wrote a stored procedure which at first deletes 100.000 rows and then inserts 100.000 new rows. There is a huge difference between executing this SP in the query-analyzer (runtime...
2
by: chets | last post by:
Hi All, I am facing problem in executing one dynamic query in PRO *C program on linux. I want to update table mytable by data MADURAI for a column mycolumn1 where primary key is myPK.I want to...
8
by: Daz | last post by:
Hi everyone. I was faced with the choice of whether my problem is indeed a PHP problem or a MySQL. I have decided it's a PHP problem as I don't experience the same problem when I execute the...
1
by: jesmi | last post by:
my code is: U]employee.cfm <html> <head> <title>Employee List</title> </head> <body> <h1>Employee List</h1>
3
by: deepak | last post by:
Hi There, i am facing problems while executing the query using ADO.NET,the problem goes below: i am using ExecuteDataset(sqlTran, CommandType.Text, query) and my query is this SELECT * FROM...
7
by: wingsss | last post by:
i am currently using WindowsXP SP2 all updated apache 2.2.4 PHP 5.2.3 MySQL 5.0 and apache hang up when running this code //...
12
by: yoavyoavyoav | last post by:
Hi , I would like a progress bar to be displayed while running an sql query. the progress bar doesn't have to move according to the query pace - I just want it to move back and forth while the...
5
by: rickbytes | last post by:
Hello, Is there a way to make my vb code to wait for a mysql query to finish executing before trying to run a new query? For example: Is there a way I can run a CREATE TEMPORARY TABLE _mytable...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.