Solved

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

Posted on 1997-07-14
2
290 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

On Demand Webinar - Networking for the Cloud Era

This webinar discusses:
-Common barriers companies experience when moving to the cloud
-How SD-WAN changes the way we look at networks
-Best practices customers should employ moving forward with cloud migration
-What happens behind the scenes of SteelConnect’s one-click button

Question has a verified solution.

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

Color can increase conversions, create feelings of warmth or even incite people to get behind a cause. If you want your website to really impact site visitors, then it is vital to consider the impact color has on them.
Does your audience prefer people in photos or no people? How can you best highlight what you’re selling? What are your competitors doing, and what can you do that is different and unique from them?  Continue reading to learn how to make your images …
Viewers will get an overview of the benefits and risks of using Bitcoin to accept payments. What Bitcoin is: Legality: Risks: Benefits: Which businesses are best suited?: Other things you should know: How to get started:
Learn how to create flexible layouts using relative units in CSS.  New relative units added in CSS3 include vw(viewports width), vh(viewports height), vmin(minimum of viewports height and width), and vmax (maximum of viewports height and width).

730 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