HTTP 500 - Internal server error

M

Moshe

Scenario -
IIS 5.0 WIN2K latest SP
Application ASP.
An ASP Page has a text area. When submitted calls SQL server 2K Stored
Procedure to update a record. The field in the data base is of type
Text.
When posting from the browser a text that is less then about 100K, no
errors. When posting more the 100K
HTTP 500 - Internal server error
Tracing the database - the call to SP was not yet executed.

Why is failing with this error? How can I trouble shoot it? Any
limitation in size when posting fields from the client to server?

Thanks,
Moshe
 
F

Foo Man Chew

HTTP 500 - Internal server error

Fix your browser, and then you can tell us what message ASP is sending.
Tools / Internet Options / Advanced, "Show friendly HTTP errors" should be
*unchecked*...
 
M

Mosh

The fisrt error I got was

error '80020009'
Exception occurred.

/Content/scm/SCMContentProfileInformtion.asp, line 100

I am not sure is line 100 is the right one as there is an #include before
that. If it is then it is on
If Trim(Request.Form("Content")) ="" Then Where Content is the field with
the large text.
Once commented out I received:

ADODB.Command error '800a0bb9'

Arguments are of the wrong type, are out of acceptable range, or are in
conflict with one another.

/Content/scm/SCMContentProfileInformtion.asp, line 144

Again if the line number is correct, then it is on:
objCMDUnitProfile("@SCMCPIContent")=Request.Form("Content")
The Stored Procedure shows:
@SCMCPIContent text,

Any idea?

Thanks,
Moshe
 
M

Mosh

I tried the following:
Dim ContentSent
ContentSent = space(200000)
and then
ContentSent = Request.Form("Content")
objCMDUnitProfile("@SCMCPIContent")= ContentSent

I tried to save a little long text and it was successful.

Then I "posted" even longer text and a new error

Request object error 'ASP 0107 : 80004005'

Stack Overflow

/Content/scm/SCMContentProfileInformtion.asp, line 145

The data being processed is over the allowed limit.

and this is on the ContentSent = Request.Form("Content") line

Now with this error I understand that ASP form limits are around 101K.

What are my choices? Do i have then to go to upload file and take data from
there and store in the database? Other options?

Thanks,

Moshe
 
F

Foo Man Chew

objCMDUnitProfile("@SCMCPIContent") = ContentSent

This is not how you pass values to parameters of the command object.

Set cmd = CreateObject("ADODB.Command")
With cmd
.CommandText = "INSERT table(column) values(?)"
.CommandType = adCmdText
.ActiveConnection = objConn
.Parameters.Append .CreateParameter ("@SCMCPIContent", adVarChar,
adParamInput, 8000, ContentSent)
.Execute
Set .ActiveConnection = Nothing
End With
Set cmd = Nothing
Request object error 'ASP 0107 : 80004005'

Stack Overflow

http://support.microsoft.com/?id=260694
 
E

Egbert Nierop \(MVP for IIS\)

Another suggestion
use adLongVarChar for the Text data type..

Foo Man Chew said:
This is not how you pass values to parameters of the command object.

Set cmd = CreateObject("ADODB.Command")
With cmd
.CommandText = "INSERT table(column) values(?)"
.CommandType = adCmdText
SET .ActiveConnection = objConn
.Parameters.Append .CreateParameter ("@SCMCPIContent", adLongVarChar,
adParamInput, Len(ContentSent), ContentSent)
.Execute
Set .ActiveConnection = Nothing
End With
Set cmd = Nothing
Do not forget to add the constants to global.asa
<!-- METADATA NAME="Microsoft ActiveX Data Objects 2.5 Library"
TYPE="TypeLib"
UUID="{00000205-0000-0010-8000-00AA006D2EA4}" -->
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,767
Messages
2,569,572
Members
45,046
Latest member
Gavizuho

Latest Threads

Top