How to get a 1 Dimensional Array out of VBScript

Technical support and scripting issues

Moderators: JRL, Dorian (MJT support)

Post Reply
rh2001
Newbie
Posts: 16
Joined: Tue Sep 14, 2004 9:48 am

How to get a 1 Dimensional Array out of VBScript

Post by rh2001 » Mon Oct 04, 2004 6:31 am

I am trying to get a one dimensional array out of vb script that connects to a database,

I could concatenate the fields and I know it works there.

However, I want it in array so I can get it out into MacroScheduler

I keeps getting a type mismatch error :13


Anyone else have this problem?

User avatar
support
Automation Wizard
Posts: 1450
Joined: Sat Oct 19, 2002 4:38 pm
Location: London
Contact:

Post by support » Mon Oct 04, 2004 9:26 am

Bear in mind that variables in MacroScript are different to variables in VBScript and so you cannot just pass a VBScript array out as it will not be useable.

Either convert the array into a delimited string that can then be exploded and converted back into a MacroScript array with Separate, or, what I would do is keep the array in VBScript global to the VBScript block and create a simple VBScript function that when given an index returns the value of the array. This simple function can be executed with VBEval in MacroScript to get the value.
MJT Net Support
[email protected]

rh2001
Newbie
Posts: 16
Joined: Tue Sep 14, 2004 9:48 am

Post by rh2001 » Mon Oct 04, 2004 4:58 pm

ok, thanks.

Post Reply
Sign up to our newsletter for free automation tips, tricks & discounts