Type mismatch

Results 1 to 2 of 2

Thread: Type mismatch

  1. #1
    Join Date
    Dec 1969

    Default Type mismatch

    I need to call a server side function from a client side vb script.<BR><BR>This is my client side vb:<BR>&#060;script language=vbscript &#062;<BR>FUNCTION RefreshOrder(n_Order)<BR> CALL fn_Select_Countries(n_Order)<BR>End FUNCTION<BR>&#060;/script&#062;<BR><BR>and this is the server side:<BR>&#060;% <BR>Dim oQuery<BR> <BR>Function fn_Select_Countries(n_Order) <BR> set oQuery = inc4_DODB_Connections()<BR> call inc4_StoredProc_Name("s_Country")<BR> call inc4_StoredProc_Params("@Sort_Order", cstr(n_Order))<BR> call inc4_StoredProc_Execute("s_Country")<BR>End Function <BR>%&#062;<BR><BR>When I call the client side function RefreshOrder(0) I get the following error:<BR> Type Mismatch: &#039fn_Select_Countries&#039<BR><BR>But I know that the server side function fn_Select_Countries(n_Order) works fine.<BR><BR>Any ideas?

  2. #2
    Join Date
    Dec 1969

    Default RE: Type mismatch

    I think you are confused:<BR>in asp, you CANNOT run a server function from client.<BR>All the info inbetween &#060;% %&#062; is processed line by line before the RESULT is given to the client.<BR><BR>So your function is gone.<BR><BR>if you want to use that function, submit to a page where you execute if, and send result back to the client.<BR><BR>Bart.

Posting Permissions

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