Type mismatch when using Server.Execute?

Ask a Question related to ASP Database, Design and Development.

  1. #1

    Default Type mismatch when using Server.Execute?

    Whe I replace: <!--#include file="utility.asp"-->

    With

    <% Server.Execute "/dev/1/utility.asp" %>

    I get a 'type mistmatch error on my connection string 'GetConnection'.

    Why would this be so if server.execute is including the same file as the
    include file in the same directory...?

    Thanks
    Jason


    Guest

  2. Similar Questions and Discussions

    1. Server.Transfer returning Type Mismatch: 'LBound'
      Hi all I'm having problems transferring form values from one page to the next. I have a welcome page that has a User Login server behaviour and...
    2. Type mismatch?
      Hi i'm getting a type mismatch error, anyone tell me why pls? conn.Execute "DELETE FROM Bmemo WHERE (tDate <= '" & date() & "')" tDate is a...
    3. Type Mismatch
      I'm at my wits end here. I am getting type mismatch error in a ASP page when I try to multiply decimals*integers. This shouldn't be this difficult....
    4. Type mismatch in expression
      Dear anyone, I used the wizard to make a form, but when I try to go from design view to form view an eooro message comes up "Type mismatch in...
    5. Type Mismatch again
      Hi, One page passes a strIssueNo to another, so on the 2nd page: Dim IssueNo IssueNo = Request.Item("strIssueNo") This 2nd page is designed...
  3. #2

    Default Re: Type mismatch when using Server.Execute?

    > Whe I replace: <!--#include file="utility.asp"-->
    >
    > With
    >
    > <% Server.Execute "/dev/1/utility.asp" %>
    You realize those are not necessarily the same path, right? Why did you add
    /dev/1/ to the server.execute call?
    > I get a 'type mistmatch error on my connection string 'GetConnection'.
    I think you're confusing the roles of #include vs. server.execute.
    Server.Execute goes out and runs a script file. Any variables created there
    are not kept in memory and the resuming portion of the calling script is not
    going to be aware of them.

    My suggestion: stick to #includes, you're using those for the right reasons.
    I don't think you're sure why you even changed it from #include to
    Server.Execute.

    --
    [url]http://www.aspfaq.com/[/url]
    (Reverse address to reply.)


    Aaron [SQL Server MVP] Guest

  4. #3

    Default Re: Type mismatch when using Server.Execute?

    On Mon, 9 Aug 2004 12:20:21 -0400, <jason@catamaranco.com> wrote:
    >Whe I replace: <!--#include file="utility.asp"-->
    >
    >With
    >
    ><% Server.Execute "/dev/1/utility.asp" %>
    >
    >I get a 'type mistmatch error on my connection string 'GetConnection'.
    >
    >Why would this be so if server.execute is including the same file as the
    >include file in the same directory...?
    The simple explanation is that something in your utility.asp needed
    something in the asp file that included it. By doing an execute you
    don't have that soemthing.

    Now as to what that something might be, we couldn't tell without some
    code, which you didn't provide.

    Jeff
    Jeff Cochran Guest

  5. #4

    Default Re: Type mismatch when using Server.Execute?

    Ok, they are the same path, I was experiment with relative and virtual
    paths...

    The reason I attempted a server.execute was based on the possibility of my
    other sub-domains on the same server consuming this file..

    However, I realise a virtual include is probably the best route as it
    appears from what you told me that I cannot carry declared variables over to
    the file that consumes it, right?

    - Jason

    "Aaron [SQL Server MVP]" <ten.xoc@dnartreb.noraa> wrote in message
    news:eMfhusjfEHA.720@TK2MSFTNGP11.phx.gbl...
    > > Whe I replace: <!--#include file="utility.asp"-->
    > >
    > > With
    > >
    > > <% Server.Execute "/dev/1/utility.asp" %>
    >
    > You realize those are not necessarily the same path, right? Why did you
    add
    > /dev/1/ to the server.execute call?
    >
    > > I get a 'type mistmatch error on my connection string 'GetConnection'.
    >
    > I think you're confusing the roles of #include vs. server.execute.
    > Server.Execute goes out and runs a script file. Any variables created
    there
    > are not kept in memory and the resuming portion of the calling script is
    not
    > going to be aware of them.
    >
    > My suggestion: stick to #includes, you're using those for the right
    reasons.
    > I don't think you're sure why you even changed it from #include to
    > Server.Execute.
    >
    > --
    > [url]http://www.aspfaq.com/[/url]
    > (Reverse address to reply.)
    >
    >

    Guest

Posting Permissions

  • You may not post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139