Home | Advertising Info21 USERS CURRENTLY ONLINE   
   Site Search Contact Us Friday, March 14, 2025  
 
 


 
ASPProtect
User Management Application with web based screens that allow you to manage users.
www.ASPProtect.com
 
ASPBanner
Banner Rotation system. Advertisers can monitor online statistical reports via their web browsers.
www.ASPBanner.com
 
ASP Photo Gallery
Upload an unlimited amount of albums. Set up categories.Image resizing thumbnail creation.
www.ASPPhotoGallery.com
 
ASPClassifieds
Classifieds system. Set up categories. Users can register themselves. Supports picture uploads.
www.ASPClassifieds.com



DISCUSSION ARCHIVES
 



We didn't realize
the site was so popular.

Other Stuff
 

 
 
Active Server Pages help tutorial how to ASP Help ASP Tutorials ASP Programming ASP Code - ASP Free CJWSoft ASPProtect ASPBanner ASPClassifieds



(Advanced)  (Components)  (Database)  (General)  (Vbscript)




ASPProtect

 
Subject: updating records with values from a form
From: Carl
Date: 2/4/2001 4:41:55 PM
IP: 38.221.252.52



 

I am having a problem passing info from a text box into a asp page to update a record.
here is the code I am using:
THESE ARE MY VARIABLES TO HOLD INPUT FROM THE FORM

target = CInt(Request.Form("txtiddel"))
Field = Request.Form("txtfield_Name")
NewVal = Request.Form("txtNew_Val")


THIS IS WHERE I AM TRING TO PASS THE INFO FOR AN UPDATE:

MYSQL ="SELECT * FROM NPL WHERE ID_NO = " & target & ""

CmdUpdateRecord.Open MYSQL,DataConn,1,3
CmdUpdateRecord.Fields(" & Field & ")= NewVal
CmdUpdateRecord.Update

The error I get is:

Item cannot be found in the collection corresponding to the requested name or ordinal.

/altered.asp, line 30


Line 30 is the line that reads:
CmdUpdateRecord.Fields(" & Field & ")= NewVal

I know that it is saying that there is not a column in the table called "Field". I am wondering how to pass the value from the form to the variable?

Any help would be greatly appreciated.

Follow Up - Re: updating records with values from a form - Ripul 2/5/2001 1:23:57 AM


 

   Active Server Pages Rule The World
Contact Us  
All artwork, design & content contained in this site are Copyright Š 1998 - 2025 PowerASP.com and Christopher J. Williams
Banner ads ,other site logos, etc are copyright of their respective companies.
STATS Unless otherwise noted - All Rights Reserved.

Active Server Pages ASP ASP.NET .aspx .ascx Web HTML Developer Internet Microsoft Web Services Visual Studio .NET CJWSoft ASPProtect ASPBanner ASPClassifieds www.aspclassifieds.com, www.powerasp.com,www.cjwsoft.com,www.aspphotogallery.com,www.codewanker.com,www.aspprotect.com,www.aspbanner.com