Wrox Programmer Forums
| Search | Today's Posts | Mark Forums Read
ASP.NET 1.0 and 1.1 Professional For advanced ASP.NET 1.x coders. Beginning-level questions will be redirected to other forums. NOT for "classic" ASP 3 or the newer ASP.NET 2.0 and 3.5
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 1.0 and 1.1 Professional section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
  #1 (permalink)  
Old December 3rd, 2003, 05:56 AM
Registered User
 
Join Date: Jun 2003
Location: Leeds, , United Kingdom.
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Default ASP Wrapper Prob

Hi Peeps

I'm trying to pass a few arrays from an asp page to a vb.net function and keep getting the error:

Invalid procedure call or argument

I understand this is because vb.net has the problem. In VB6 I'd have declared the datatypes as Variant, so have tried using Object in vb.net, but no joy.

I should mention that the .net assembly is registered in the GAC, and I have several other routines running perfectly between asp and asp.net.

Has anyone any advice on this?

ASP code as follows:

Dim strParamName()
Dim strParamValue()
Dim strParamDataType()
Dim strParamSize()

ReDim strParamName(0)
ReDim strParamValue(0)
ReDim strParamDataType(0)
ReDim strParamSize(0)

strParamName(0) = "@UserID"
strParamValue(0) = "31"
strParamDataType(0) = "2"
strParamSize(0) = "4"

ReDim strParamName(1)
ReDim strParamValue(1)
ReDim strParamDataType(1)
ReDim strParamSize(1)

strParamName(1) = "@UserID"
strParamValue(1) = "41"
strParamDataType(1) = "2"
strParamSize(1) = "4"

Set objIntParam = Server.CreateObject("InteropServer.InteropServer")

Set objRS2 = objIntParam.ExecuteSPWithParams("Pr_InteropTest" , "5" , strParamName , strParamValue , strParamDataType , strParamSize , True , strErrNum , strErrDesc)

If strErrDesc <> "" Then

Response.Write "The following error occured:

" & "Error Number = " & strErrNum & "
Error Description = " & strErrDesc & ""

Else

Do While objRS2.EOF = False

Response.Write Trim(objRS2.Fields(0).Value & "") & ", " & Trim(objRS2.Fields(1).Value & "") & "<br><br>"

objRS2.MoveNext

Loop

End If

Set objInt1 = Nothing
Set objRS2 = Nothing

DOT.NET Function:

Public Function ExecuteSPWithParams(ByVal p_strSQL As String, ByVal p_strRole As String, ByRef p_strParameterNames() As String, ByRef p_objParameterValues() As String, ByRef p_strDataType() As String, ByRef p_strDataTypeSize() As String, ByVal p_blnParametersPassed As Boolean, ByRef Return_ErrNum As String, ByRef Return_ErrDesc As String) As ADODB.Recordset


Blah
Blah

End Function

I haven't included all the function code as that's not the problem. I basically need to whether it's possible to pass a 1 dimensional array to a vb.net function from asp.

TIA
Joe




Similar Threads
Thread Thread Starter Forum Replies Last Post
asp sql prob sasha hantz Classic ASP Professional 1 October 6th, 2007 12:18 PM
Using the Stored Procedure Wrapper rHasan BOOK: Professional VB 2005 ISBN: 0-7645-7536-8 1 March 29th, 2007 07:58 AM
ASP.NET COM Wrapper for Web Service ashettleroe Classic ASP Professional 0 August 12th, 2005 05:30 PM
Error "Unicode wrapper not found" malkav Crystal Reports 0 August 6th, 2004 02:50 PM
ActiveX wrapper JeffMM Classic ASP Components 0 March 23rd, 2004 02:56 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.