FileUp
Topic: Re: Microsoft VBScript runtime error '800a01a8' Object required: '[undefined]'

SoftArtisans Forums

Page 1 of 1 (6 items)


Posted by SamAlone on 11-10-2006 4:04 PM

Hey

I get this error when opening my email.asp page

Exakt Error:

Microsoft VBScript runtime error '800a01a8'

Object required: '[undefined]'

/simpleemail.asp, line 58

 

On line 58 this is the code:

    If Not upl.Form("attachfile").IsEmpty Then
            '--- If so, set a flag that we'll use later on
            '--- and save the file to the disk
            bAttachFile = True
            upl.Form("attachfile").Save
      Else
            '--- If not, set the flag to False
            '--- we'll test this flag later on to prevent errors
            bAttachFile = False
      End If

What is wrong ?

Thx

Regards

SamAlone


Posted by Debbie on 11-11-2006 9:18 PM

You'll see that our samples check to see if the form element is a file input control with the isObject check. After it passes that check, then check if it empty.

 

If IsObject(oFileUp.Form("myFile")) Then 

     If Not oFileUp.Form("myFile").IsEmpty Then

File input form elements are objects, regular text input form elements are not.

 


Posted by SamAlone on 11-14-2006 12:00 PM

Thx for your answer Debbie, but .. i think you need to help me more then that,

should i use the code you pasted in ? if i should, should i just paste it in below the code i

pasted in this thread ?

 

Thanks !


Posted by Debbie on 11-15-2006 9:47 AM

I meant to imply that you need to test for whether your element is empty and whether or not the element is an object. Right now, you are only testing to see if it is empty.

 

If IsObject(upl.Form("attachfile")) Then 

'---We've verified that this if a file input control

     If Not upl.Form("attachfile").IsEmpty Then
            '--- If so, set a flag that we'll use later on
            '--- and save the file to the disk
            bAttachFile = True
            upl.Form("attachfile").Save
      Else
            '--- If not, set the flag to False
            '--- we'll test this flag later on to prevent errors
            bAttachFile = False
      End If

Else

'---Then handle this error.

End if

 

 


Posted by suyashxp on 10-01-2011 9:56 AM
hi ,

i also faced same issue But my issue was with database .

My ERROR:

Microsoft VBScript runtime error '800a000d'

Type mismatch

/Payment/Thanks_for_payment.asp, line 56



I  google and find all the way to resolve and got one of solution

This error occurs when

1. the object is not created (set is the instruction)

Dim rsordrdetails
on error resume next
Set rsordrdetails_cmd = Server.CreateObject ("ADODB.Command")

2. when The data ***y fired results no data and you try to acccess the column of the Record set

rep_name= rsordrdetails("Email")  ' as there is No record it will fire error

solution

If (NOT rsordrdetails.EOF) Then
response.Write(" rsordrdetails("Email") :  " & rsordrdetails("Email") )

rep_name= rsordrdetails("Email")

..

...

end if

3. when you written a Wrong store Procudure name and hence object "" is not creted (my case)

Dim rsordrdetails
Dim rsordrdetails_cmd
Dim rsordrdetails_numRows
on error resume next
Set rsordrdetails_cmd = Server.CreateObject ("ADODB.Command")
rsordrdetails_cmd.ActiveConnection = MM_conn_STRING

rsordrdetails_cmd.CommandText = "proc_GetInvDetails"
rsordrdetails_cmd.CommandType = adCmdStoredProc 'Requires the adovbs.inc file or typelib meta tag

acatully i changed the name from "GetInvDetails" to "Get_GetInvDetails" but forget to update and hence i got issue

"Microsoft VBScript runtime error '800a000d'

Type mismatch

/Payment/Thanks_for_payment.asp, line 56"


think if any one stuck in this issue in future might get help

Posted by suyashxp on 10-01-2011 9:58 AM
 suyashxp wrote:
hi ,

i also faced same issue But my issue was with database .

My ERROR:

Microsoft VBScript runtime error '800a000d'

Type mismatch

/Payment/Thanks_for_payment.asp, line 56



I  google and find all the way to resolve and got one of solution

This error occurs when

1. the object is not created (set is the instruction)

Dim rsordrdetails
on error resume next
Set rsordrdetails_cmd = Server.CreateObject ("ADODB.Command")

2. when The data ***y fired results no data and you try to acccess the column of the Record set

rep_name= rsordrdetails("Email")  ' as there is No record it will fire error

solution

If (NOT rsordrdetails.EOF) Then
response.Write(" rsordrdetails("Email") :  " & rsordrdetails("Email") )

rep_name= rsordrdetails("Email")

..

...

end if

3. when you written a Wrong store Procudure name and hence object "" is not creted (my case)

Dim rsordrdetails
Dim rsordrdetails_cmd
Dim rsordrdetails_numRows
on error resume next
Set rsordrdetails_cmd = Server.CreateObject ("ADODB.Command")
rsordrdetails_cmd.ActiveConnection = MM_conn_STRING

rsordrdetails_cmd.CommandText = "proc_GetInvDetails"
rsordrdetails_cmd.CommandType = adCmdStoredProc 'Requires the adovbs.inc file or typelib meta tag

acatully i changed the name from "GetInvDetails" to "Get_GetInvDetails" but forget to update and hence i got issue

"Microsoft VBScript runtime error '800a000d'

Type mismatch

/Payment/Thanks_for_payment.asp, line 56"


think if any one stuck in this issue in future might get help


some typo i made and rectified

P.s. Actually i changed the name from "GetInvDetails" to "Get_InvDetails" but forget to update and hence i got issue