Type Mismatch Error 
Author Message
 Type Mismatch Error

Hi!

   The below listed VBScript works fine, if rows are found that match the
sql select statement. If no rows are found that match the sql statement I
get a error:

Microsoft VBScript runtime error '800a000d'
Type mismatch: 'NoRecordsFound'

     strsql = "..."
     rs.open strsql, conn
     IF not rs.EOF Then
     ' set the filename to open_close_all_accts.xls
     Response.AddHeader "Content-Disposition",
"filename=open_close_all_accts.xls"
     ' set the mime type to Microsoft Excel
     Response.ContentType = "application/vnd.ms-excel"
          Else
            Call NoRecordsFound()
     End IF

Any suggestions would be greatly appreciated.



Sat, 17 Dec 2005 09:01:41 GMT  
 Type Mismatch Error
It does not recognize the NoRecordsFound procedure. I can't say why without
seeing more code.
Bob
Quote:

> Hi!

>    The below listed vbscript works fine, if rows are found that match
> the sql select statement. If no rows are found that match the sql
> statement I get a error:

> Microsoft VBScript runtime error '800a000d'
> Type mismatch: 'NoRecordsFound'

>      strsql = "..."
>      rs.open strsql, conn
>      IF not rs.EOF Then
>      ' set the filename to open_close_all_accts.xls
>      Response.AddHeader "Content-Disposition",
> "filename=open_close_all_accts.xls"
>      ' set the mime type to Microsoft Excel
>      Response.ContentType = "application/vnd.ms-excel"
>           Else
>             Call NoRecordsFound()
>      End IF

> Any suggestions would be greatly appreciated.



Sat, 17 Dec 2005 09:18:00 GMT  
 Type Mismatch Error
Hi!

Here is the norecordsfound function:

'===========================================================================
=='
FUNCTION NoRecordsFound
'===========================================================================
=='
    Set FileObject = Server.CreateObject("Scripting.FileSystemObject")
    TemplateText = Server.MapPath("HTML/blank.htm")
    Set InStream = FileObject.OpenTextFile (TemplateText, 1, False, False)
    TemplateText = Empty
    While not InStream.AtEndOfStream
    TemplateText = TemplateText & InStream.ReadLine & vbcrlf
    Wend
    Set Instream = Nothing
    DIM tmpMsg
    tmpMsg = "<a href='JAVASCRIPT:history.back();'>No records were
found</a>"

    Response.Write(TemplateText)
    Set FileObject = Nothing

END FUNCTION
'---------------------------------------------------------------------------
--'


Quote:
> It does not recognize the NoRecordsFound procedure. I can't say why
without
> seeing more code.
> Bob


> > Hi!

> >    The below listed vbscript works fine, if rows are found that match
> > the sql select statement. If no rows are found that match the sql
> > statement I get a error:

> > Microsoft VBScript runtime error '800a000d'
> > Type mismatch: 'NoRecordsFound'

> >      strsql = "..."
> >      rs.open strsql, conn
> >      IF not rs.EOF Then
> >      ' set the filename to open_close_all_accts.xls
> >      Response.AddHeader "Content-Disposition",
> > "filename=open_close_all_accts.xls"
> >      ' set the mime type to Microsoft Excel
> >      Response.ContentType = "application/vnd.ms-excel"
> >           Else
> >             Call NoRecordsFound()
> >      End IF

> > Any suggestions would be greatly appreciated.



Sat, 17 Dec 2005 09:26:06 GMT  
 Type Mismatch Error
Where is this function declared? For some reason it is not visible to the
code that's calling it. Again, I don't have enough information to be able to
say why.

Bob

Quote:

> Hi!

> Here is the norecordsfound function:

'===========================================================================
Quote:
> =='
> FUNCTION NoRecordsFound

'===========================================================================
Quote:
> =='
>     Set FileObject = Server.CreateObject("Scripting.FileSystemObject")
>     TemplateText = Server.MapPath("HTML/blank.htm")
>     Set InStream = FileObject.OpenTextFile (TemplateText, 1, False,
>     False) TemplateText = Empty
>     While not InStream.AtEndOfStream
>     TemplateText = TemplateText & InStream.ReadLine & vbcrlf
>     Wend
>     Set Instream = Nothing
>     DIM tmpMsg
>     tmpMsg = "<a href='JAVASCRIPT:history.back();'>No records were
> found</a>"

>     Response.Write(TemplateText)
>     Set FileObject = Nothing

> END FUNCTION

'---------------------------------------------------------------------------

- Show quoted text -

Quote:
> --'



>> It does not recognize the NoRecordsFound procedure. I can't say why
>> without seeing more code.
>> Bob


>>> Hi!

>>>    The below listed vbscript works fine, if rows are found that
>>> match the sql select statement. If no rows are found that match the
>>> sql statement I get a error:

>>> Microsoft VBScript runtime error '800a000d'
>>> Type mismatch: 'NoRecordsFound'

>>>      strsql = "..."
>>>      rs.open strsql, conn
>>>      IF not rs.EOF Then
>>>      ' set the filename to open_close_all_accts.xls
>>>      Response.AddHeader "Content-Disposition",
>>> "filename=open_close_all_accts.xls"
>>>      ' set the mime type to Microsoft Excel
>>>      Response.ContentType = "application/vnd.ms-excel"
>>>           Else
>>>             Call NoRecordsFound()
>>>      End IF

>>> Any suggestions would be greatly appreciated.



Sat, 17 Dec 2005 18:27:30 GMT  
 Type Mismatch Error
Here is my attempt to reproduce your error:

<%
Call NoRecordsFound

FUNCTION NoRecordsFound
  Set FileObject = Server.CreateObject("Scripting.FileSystemObject")
  TemplateText = Server.MapPath("HTML/blank.htm")
  Set InStream = FileObject.OpenTextFile (TemplateText, 1, False, False)
  TemplateText = Empty
  While not InStream.AtEndOfStream
  TemplateText = TemplateText & InStream.ReadLine & vbcrlf
  Wend
  Set Instream = Nothing
  DIM tmpMsg
  tmpMsg = "<a href='JAVASCRIPT:history.back();'>No records were found</a>"

  Response.Write(TemplateText)
  Set FileObject = Nothing
END FUNCTION
%>

I created a folder called HTML and put a file called blank.htm containing
the word "test" into the folder. When I ran this page it resulted in the
word "test" being displayed in my browser window.

So, you need to show me how to reproduce your error.

Bob Barrows

Quote:

> Hi!

> Here is the norecordsfound function:

'===========================================================================
Quote:
> =='
> FUNCTION NoRecordsFound

'===========================================================================
Quote:
> =='
>     Set FileObject = Server.CreateObject("Scripting.FileSystemObject")
>     TemplateText = Server.MapPath("HTML/blank.htm")
>     Set InStream = FileObject.OpenTextFile (TemplateText, 1, False,
>     False) TemplateText = Empty
>     While not InStream.AtEndOfStream
>     TemplateText = TemplateText & InStream.ReadLine & vbcrlf
>     Wend
>     Set Instream = Nothing
>     DIM tmpMsg
>     tmpMsg = "<a href='JAVASCRIPT:history.back();'>No records were
> found</a>"

>     Response.Write(TemplateText)
>     Set FileObject = Nothing

> END FUNCTION

'---------------------------------------------------------------------------

- Show quoted text -

Quote:
> --'



>> It does not recognize the NoRecordsFound procedure. I can't say why
>> without seeing more code.
>> Bob


>>> Hi!

>>>    The below listed vbscript works fine, if rows are found that
>>> match the sql select statement. If no rows are found that match the
>>> sql statement I get a error:

>>> Microsoft VBScript runtime error '800a000d'
>>> Type mismatch: 'NoRecordsFound'

>>>      strsql = "..."
>>>      rs.open strsql, conn
>>>      IF not rs.EOF Then
>>>      ' set the filename to open_close_all_accts.xls
>>>      Response.AddHeader "Content-Disposition",
>>> "filename=open_close_all_accts.xls"
>>>      ' set the mime type to Microsoft Excel
>>>      Response.ContentType = "application/vnd.ms-excel"
>>>           Else
>>>             Call NoRecordsFound()
>>>      End IF

>>> Any suggestions would be greatly appreciated.



Sat, 17 Dec 2005 20:08:46 GMT  
 Type Mismatch Error
Hi Bob!

You were correct, my include was malformed. Now it works fine.

Thank you for the help.

Chuck


Quote:
> Here is my attempt to reproduce your error:

> <%
> Call NoRecordsFound

> FUNCTION NoRecordsFound
>   Set FileObject = Server.CreateObject("Scripting.FileSystemObject")
>   TemplateText = Server.MapPath("HTML/blank.htm")
>   Set InStream = FileObject.OpenTextFile (TemplateText, 1, False, False)
>   TemplateText = Empty
>   While not InStream.AtEndOfStream
>   TemplateText = TemplateText & InStream.ReadLine & vbcrlf
>   Wend
>   Set Instream = Nothing
>   DIM tmpMsg
>   tmpMsg = "<a href='JAVASCRIPT:history.back();'>No records were
found</a>"

>   Response.Write(TemplateText)
>   Set FileObject = Nothing
> END FUNCTION
> %>

> I created a folder called HTML and put a file called blank.htm containing
> the word "test" into the folder. When I ran this page it resulted in the
> word "test" being displayed in my browser window.

> So, you need to show me how to reproduce your error.

> Bob Barrows


> > Hi!

> > Here is the norecordsfound function:

'===========================================================================
Quote:
> > =='
> > FUNCTION NoRecordsFound

'===========================================================================

- Show quoted text -

Quote:
> > =='
> >     Set FileObject = Server.CreateObject("Scripting.FileSystemObject")
> >     TemplateText = Server.MapPath("HTML/blank.htm")
> >     Set InStream = FileObject.OpenTextFile (TemplateText, 1, False,
> >     False) TemplateText = Empty
> >     While not InStream.AtEndOfStream
> >     TemplateText = TemplateText & InStream.ReadLine & vbcrlf
> >     Wend
> >     Set Instream = Nothing
> >     DIM tmpMsg
> >     tmpMsg = "<a href='JAVASCRIPT:history.back();'>No records were
> > found</a>"

> >     Response.Write(TemplateText)
> >     Set FileObject = Nothing

> > END FUNCTION

'---------------------------------------------------------------------------

- Show quoted text -

Quote:
> > --'



> >> It does not recognize the NoRecordsFound procedure. I can't say why
> >> without seeing more code.
> >> Bob


> >>> Hi!

> >>>    The below listed vbscript works fine, if rows are found that
> >>> match the sql select statement. If no rows are found that match the
> >>> sql statement I get a error:

> >>> Microsoft VBScript runtime error '800a000d'
> >>> Type mismatch: 'NoRecordsFound'

> >>>      strsql = "..."
> >>>      rs.open strsql, conn
> >>>      IF not rs.EOF Then
> >>>      ' set the filename to open_close_all_accts.xls
> >>>      Response.AddHeader "Content-Disposition",
> >>> "filename=open_close_all_accts.xls"
> >>>      ' set the mime type to Microsoft Excel
> >>>      Response.ContentType = "application/vnd.ms-excel"
> >>>           Else
> >>>             Call NoRecordsFound()
> >>>      End IF

> >>> Any suggestions would be greatly appreciated.



Sat, 17 Dec 2005 21:00:46 GMT  
 
 [ 6 post ] 

 Relevant Pages 

1. Passing user data type to function causes type mismatch error

2. Worked fine yesterday, today I get Error 13 Type Mismatch errors

3. Error 13: Type Mismatch error

4. type mismatch error: 3464.

5. Type Mismatch Error in 2000, not in 97

6. NULL VALUES IN DATE FIELD - TYPE MISMATCH ERROR

7. type mismatch error on db.openrecordset(sqlString) -- dont see what the problem is

8. Type Mismatch Error

9. Recordset Type Mismatch Error

10. Type Mismatch Error 13

11. type mismatch error

12. OpenRecordset produces Type Mismatch Error

 

 
Powered by phpBB® Forum Software