Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Getting an Array from a function in .asp

Status
Not open for further replies.

Chadk

Programmer
Jun 20, 2000
3
US
I have a .dll with a function within it that gets information and puts it into an array. If I access this function from VB it works great if I try and do the same in .asp it fails giving "Error Type: Provider (0x80004005) Unspecified error" Here is the code from the VB part that works:

Dim thetest As New ActiveDirectorySearch.Search
Dim a() As String
a() = thetest.ByInfo("Smith")

Here is the section of .asp code that does not work.

dim b(1000)
set a = server.CreateObject("ActiveDirectorySearch.Search")
b(0) = "hello"
b() = a.ByInfo("smith")



Is this just a limit of .asp and if so How can I get mutiple values from a function into .asp?

Chad.
 
Hi,

I saw you using the DLL but I didn't saw you declare it!! Where did you say that you're using an external DLL?
It's just a tip!

Regards,
Luís Silva
 
Well, if it's crashing out on your createObject statement, then my guess would be that you haven't registered the dll on the server where you are trying to use it.

You don't have to register the dll with vb, but you do if you're going to use it with ASP.

:)
Paul Prewett
 
It's not crashing on the CreateObject, but on the execution of b() = a.ByInfo("smith") on the asp side.
 
What DLL provides the "ActiveDirectorySearch.Search" that you're using?

Perhaps the statement: a.ByInfo("smith") is returning multiple column values for each element in the array, and it doesn't like assigning that to the array "b()" ?? Just a thought.
 
I believe ASP has problems with variant-arrays with the dim a() declare-- try declaring a as variant (omit the "As String") phrase) and the value can be assigned when you capture a = thetest.ByInfo("Smith")
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top