dbTalk Databases Forums  

Hold rowset values in an array of global variables

microsoft.public.sqlserver.dts microsoft.public.sqlserver.dts


Discuss Hold rowset values in an array of global variables in the microsoft.public.sqlserver.dts forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Janliz
 
Posts: n/a

Default Hold rowset values in an array of global variables - 02-11-2004 , 07:56 PM






I could display rowset values one by one as follows. But How to hold the rowset values in an array of a global variable?

ie.
rowset = select a,b,c from tabl
Set oRS = DTSGlobalVariables("RSTables").Valu
msgbox oRS.Fields(0).Value '
msgbox oRS.Fields(1).Value '
msgbox oRS.Fields(2).Value '


Reply With Quote
  #2  
Old   
Allan Mitchell
 
Posts: n/a

Default Re: Hold rowset values in an array of global variables - 02-12-2004 , 01:21 AM






You can't. If what you want is to have is something like this

SELECT A,B,C FROM TABLE

This returns > 1 row

Global Variable A
Global Variable B
Global Variable C

The Global Variable associated with the field name will hold an array of the
field.

Is that what you want ?

--

----------------------------

Allan Mitchell MCSE,MCDBA, (Microsoft SQL Server MVP)
www.allisonmitchell.com - Expert SQL Server Consultancy.
www.SQLDTS.com - The site for all your DTS needs.
I support PASS - the definitive, global community
for SQL Server professionals - http://www.sqlpass.org


"Janliz" <anonymous (AT) discussions (DOT) microsoft.com> wrote

Quote:
I could display rowset values one by one as follows. But How to hold the
rowset values in an array of a global variable?

ie.
rowset = select a,b,c from table
Set oRS = DTSGlobalVariables("RSTables").Value
msgbox oRS.Fields(0).Value 'a
msgbox oRS.Fields(1).Value 'b
msgbox oRS.Fields(2).Value 'c




Reply With Quote
  #3  
Old   
Janliz
 
Posts: n/a

Default Re: Hold rowset values in an array of global variables - 02-12-2004 , 02:46 AM



Yes. That's what I want.

Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.