Print Page | Close Window

ASP update code

Printed From: Web Wiz Forums
Category: General Discussion
Forum Name: ASP.NET Discussion
Forum Description: Discussion and chat on ASP.NET related topics.
URL: https://forums.webwiz.net/forum_posts.asp?TID=29984
Printed Date: 28 March 2026 at 5:22am
Software Version: Web Wiz Forums 12.08 - https://www.webwizforums.com


Topic: ASP update code
Posted By: WebCity
Subject: ASP update code
Date Posted: 25 November 2011 at 12:44am
hello,  I have a asp code that updates a ms access database.  It works great on a iis6 server as it should but on a .net server it gives me an error with no message of what the error might be. I was wondering if some one could help me to convert it to .net?
 
<!--#include file="conn.asp" -->
<%
if request("cat_id")<>"" then
dim cat_id
cat_id=request("cat_id")

UpdateSql="UPDATE CATEGORIES SET "
UpdateSql=UpdateSql & "cat_name='" & Replace(request("CAT_NAME"),"'","''") & "',"
UpdateSql=UpdateSql & "cat_desc='" & Replace(request("CAT_DESC"),"'","''") & "' "
UpdateSql=UpdateSql & " WHERE CAT_ID=" & cat_id
Set UpdateCmd = Server.CreateObject("ADODB.Command")
UpdateCmd.ActiveConnection = connStr
UpdateCmd.CommandText = UpdateSql
UpdateCmd.Execute
UpdateCmd.ActiveConnection.Close
 
response.Redirect ("categories.asp")
else
response.Redirect ("categories.asp")
end if
%>



Replies:
Posted By: dpyers
Date Posted: 28 November 2011 at 6:28am
Most likely it's a pathing or a directory permissions error as you're on a new server.
Turn off friendly error messages in your IE options to see a more detailed error message.


-------------

Lead me not into temptation... I know the short cut, follow me.


Posted By: WebCity
Date Posted: 28 November 2011 at 3:19pm
I have friendly error messages turned off.  you are not allowed to see any errors on a iis7 server.  Because I couldn't see any errors I was forced to build this on a iis6 server where I can view errors.  When I uploaded it to the iis7 or windows 2008 server they told me they allow classic asp to view data from a database but will not allow insert,update or delete.  if I wanted this to work I needed to use .net programing   I tried to just change the file from .asp to .aspx but that didn't help.
 
I am afraid I may have to find a hosting company that will support asp fully and allow error messages to be viewd on the broswer.


Posted By: WebWiz-Bruce
Date Posted: 28 November 2011 at 5:06pm
You can have detailed error messages for ASP in Windows 2008 IIS 7.

Have a look at our own hosting packages on this web site. They are on Windows 2008 R2 IIS 7.5 with full support for ASP. If you need detailed error messages enabled then we can set this up for you in a couple of minutes at no extra cost.

Our Windows Hosting package can be found on the page below:-

http://www.webwiz.net/web-hosting/" rel="nofollow - http://www.webwiz.net/web-hosting/


-------------
https://www.webwiz.net/web-wiz-forums/forum-hosting.htm" rel="nofollow - Web Wiz Forums Hosting
https://www.webwiz.net/web-hosting/windows-web-hosting.htm" rel="nofollow - ASP.NET Web Hosting



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.08 - https://www.webwizforums.com
Copyright ©2001-2026 Web Wiz Ltd. - https://www.webwiz.net