Solved

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

Posted on 1997-07-14
2
283 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

Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

Question has a verified solution.

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

Password hashing is better than message digests or encryption, and you should be using it instead of message digests or encryption.  Find out why and how in this article, which supplements the original article on PHP Client Registration, Login, Logo…
Developer portfolios can be a bit of an enigma—how do you present yourself to employers without burying them in lines of code?  A modern portfolio is more than just work samples, it’s also a statement of how you work.
This tutorial demonstrates how to identify and create boundary or building outlines in Google Maps. In this example, I outline the boundaries of an enclosed skatepark within a community park.  Login to your Google Account, then  Google for "Google M…
Video by: Mark
This lesson goes over how to construct ordered and unordered lists and how to create hyperlinks.

832 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