Solved

ASP - Assigning new val w/'request.form' var in update query

Posted on 1997-07-14
2
289 Views
Last Modified: 2013-12-25
In Visual InterDev, I'm attempting to assign a new value to an update query using [request.form("var")].  VInterDev accepts the variable, but when the ASP form handler is executed, I receive a syntax error.  The criteria can contain a variable name, but what is the proper syntax for entering a variable into the 'new value' field in query designer?

My SQL statement:
UPDATE     tblEFIActionItemRegister_Volt
SET            comments = [request.form("comments")]
WHERE      (id = [id])

Also, I'm using the DCC/DTC component.

Thanks in advance.
0
Comment
Question by:jlow
2 Comments
 
LVL 28

Accepted Solution

by:
sybe earned 100 total points
ID: 1854469
What I usually do is make a read/write recordset(named "RS") with a SQL statement like this:

SELECT * FROM Table WHERE ID=[ID]

then

RS("comments")=Request.Form("comments")
RS.Update

and it is done

I don't like the VisualInterdev Wizard, it produces too much code, and whenever you want to adapt something you are lost.

0
 

Author Comment

by:jlow
ID: 1854470
RS.Update using a select query is something that I have not run across.  I'll try it.  Thanks for the answer.
0

Featured Post

How Do You Stack Up Against Your Peers?

With today’s modern enterprise so dependent on digital infrastructures, the impact of major incidents has increased dramatically. Grab the report now to gain insight into how your organization ranks against your peers and learn best-in-class strategies to resolve incidents.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

I've been asked to discuss some of the UX activities that I'm using with my team. Here I will share some details about how we approach UX projects.
This article will inform Clients about common and important expectations from the freelancers (Experts) who are looking at your Gig.
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…
The viewer will get a basic understanding of what section 508 compliance can entail, learn about skip navigation links, alt text, transcripts, and font size controls.

827 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question