August 19, 2005 at 1:03 pm
Hi peeps:
I'm not sure if this is specifically related to SQL, but does anyone know how to deal with a HTTP 500 - Internal server error ?
I have an ASP script that is writing to an SQL database using a Stored Procedure. I've verified that the Stored Procedure works...
any ideas?
Thanks!
August 19, 2005 at 1:05 pm
Dudette, make a new page, or take a old one that worked before you started doing that page and run it. If this one works then the error is in the code of the new page that I already told you how to fix.
August 19, 2005 at 1:08 pm
I figured how to get rid of that error message and get "real" error messages.
In IE, goto Tools -> Internet Options->Advanced and turn off Friendly Error Messages...
BTW, the "real" error is:
ADODB.Command error '800a0bb9'
Arguments are of the wrong type, are out of acceptable range, or are in conflict with one another.
fg_2.asp, line 135
LINE 135 is:
MyCmd.CommandType = adCmdStoredProc
August 19, 2005 at 1:12 pm
is the include file working?? that shouldn't fail with that on.
August 19, 2005 at 1:16 pm
I assume it's working...I have this line in there:
<!--#include virtual="adovbs.inc"-->
and I put that file in the same directory as the script.
Thanks!
August 19, 2005 at 1:18 pm
make a new asp file in the same directory, with just the include line and response.write adCmdStoredProc
If that fails then this is your problem, if not then you just found out why I don't like asp's design tools.
August 19, 2005 at 1:25 pm
It was a problem with my include file...I fixed it, but now I get this error:
ADODB.Connection error '800a0e79'
Operation is not allowed when the object is open.
/fgates/fg_insert_2.asp, line 1164
strangely, line 1164 is blank...
1161 MyParam.Type = adChar
1162
1163 MyCmd.Parameters.Append MyParam
1164
1165 Set MyParam = SERVER.CREATEOBJECT ("ADODB.Parameter")
August 19, 2005 at 1:27 pm
follow my template... open the connection at the last second and CLOSE it right after the call is made.
August 19, 2005 at 1:59 pm
Ha!
I finally got it so that it displays no errors! No errors!
But now it's just a blank screen. Is there a way to return a value or something so that I know that it works? I can go into sql manager and check the database, but I'd like for the script to return something to show that it worked correctly.
Any thoughts?
Thanks GUYS!
August 19, 2005 at 2:06 pm
check the return value (almost last line of code). If it's 0 it worked, then you can do response.redirect (.url????) and send 'em to another page.
August 19, 2005 at 2:13 pm
You mean this line(red)?
MyCmd.Execute exec_sp_biginsert
MyCn.Close
ReturnValue = CInt(MyCmd.Parameters("@Return").Value)
Set MyParam = Nothing
Set MyCmd = Nothing
%>
What do I do with it? Just a response.write(ReturnValue)? or if ReturnValue=0 then response.redirect(success.asp) else response.redirect(failed.asp)?
August 19, 2005 at 2:16 pm
if it's over 0 it's an error, else it's ok. You show the users what you want 'em to see.
Viewing 12 posts - 1 through 11 (of 11 total)
You must be logged in to reply to this topic. Login to reply