Another thing is that it [typically] doesn't make sense to add a column on the fly to a table, but it does make sense to add/delete rows. Therefore, the GetRows array is (C, R) where you can adjust the # of rows in the array.
If you don'y use GetRows, that's your loss :-) David L. Penton, Microsoft MVP JCPenney Application Specialist / Lead "Mathematics is music for the mind, and Music is Mathematics for the Soul. - J.S. Bach" [EMAIL PROTECTED] Do you have the VBScript Docs or SQL BOL installed? If not, why not? VBScript Docs: http://www.davidpenton.com/vbscript SQL BOL: http://www.davidpenton.com/sqlbol -----Original Message----- From: Michael Elfial [mailto:[EMAIL PROTECTED]] Tricky ;) No doubt. However the question was first asked by someone else - I am, personally, avoiding GetRows. Michael -----Original Message----- From: Ben Timby [mailto:[EMAIL PROTECTED]] -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Michael, what I have done in the past, is modify my SQL to select additional null columns. Then I can use these columns to fill w/ my own data. Set rsTemp = objConn.Execute("SELECT value1, value2, null as value3, null as value4 FROM tblTable") arData = rsTemp.GetRows() For X = 0 To Ubound(arData, 2) arData(2, X) = "mine own value :-)" Next rsTemp.Close Set rsTemp = Nothing objConn.Close Set objConn = Nothing Ben Timby Webexcellence PH: 317.423.3548 x23 TF: 800.808.6332 x23 FX: 317.423.8735 [EMAIL PROTECTED] www.webexc.com - -----Original Message----- From: Michael Elfial [mailto:[EMAIL PROTECTED]] Sent: Friday, August 09, 2002 6:53 AM To: ActiveServerPages Subject: RE: Riddle me this.. (ReDim array) Hm, see this: - --> If you use the Preserve keyword, you can resize only the last array dimension, and you can't change the number of dimensions at all. <-- - From VBScript documentation I've been interested in your question and I took a look at the SafeArray Win32 APIs again. And the reason for the above is obvious - there is API function for the last dimension only (right most dimension) but nothing else. Other actions must be made "manually" e.g. the guys that developed VBScript should write code to create new array and copy the elements from the original and not just call an existing function... Michael - -----Original Message----- From: Thomas V. Nielsen [mailto:[EMAIL PROTECTED]] Sent: Friday, August 09, 2002 4:31 PM To: ActiveServerPages Subject: RE: Riddle me this.. (ReDim array) > The Preserve keyword is probably the culprit. You can't change the > number of dimensions when using this keyword. If you haven't > already, try: Hmm, I am begining to remember something about dynamic, vs. static arrays > dim arData() Is dynamic, and therefor you can do > redim arData(14,1) > redim preserve arData(14,max no of records) However, I am suspecting that getRows returns a static array.. <Thomas/> --- You are currently subscribed to activeserverpages as: [email protected] To unsubscribe send a blank email to [EMAIL PROTECTED]
