Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / Developer Toolkits / December 2005

Tip: Looking for answers? Try searching our database.

Help: ASP updating SQL to Access

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
kelvin H - 17 Nov 2005 03:56 GMT
I try to do update to Database through ASP.
There are two textbox in the form, "txtstyID" and "txtstyName".
The code is like that:

<%
... ...
strSQL="UPDATE qryStylesAll SET Style_Name = '" & request.form("txtstyName")
& "' WHERE Style_ID ="  & request.form("txtstyID")
... ...
%>

e.g. txtstyID =24,
It didn't work,

Then,
When I response.write the strSQL, It showed:
"UPDATE qryStylesAll SET Style_Name = "Hello"  WHERE Style_ID =24, 24"

(BUT when I change the strSQL to,  "...  WHERE Style_ID=24 ", it works)

What's the problem?
What's wrong with the field of txtstyID ?
davidp - 21 Dec 2005 16:31 GMT
I'm not the greatest at ASP

Is request.form("txtstyID") returning '24' or '24,24'?
From the post it appears to be 24,24.  This will error out.  
Validate the value that is being passed from the form.

> I try to do update to Database through ASP.
> There are two textbox in the form, "txtstyID" and "txtstyName".
[quoted text clipped - 18 lines]
> What's the problem?
> What's wrong with the field of txtstyID ?
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.