Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Retrieving 2 or more values from a DB query
#6
Solved: 11 Years, 4 Months, 4 Weeks ago
Hi Basanth,

I guess I am still confused at the disconnect here. It seems the 1st variable adj(0) has both values stored. I cannot separate them successfully. I understand the arrays concept but am not familiar with the Split function.

So I updated my code to print out the 2 values after the For statement:

Code:
adj = Split(val2, VBLF)
For i = Lbound(adj) to Ubound(adj)
msgbox adj(i)
Next

msgbox adj(0)
msgbox adj(1)
When I run this, msgbox adj(0) prints out:
TRAIN1
TRAIN2

and msgbox adj(1) throws an error:

Subscript out of range: '[number: 1]'
Line (37): "msgbox adj(1)".

I will look more into the Split function, but if you have further suggestions I appreciate the help...

-egun
Reply


Messages In This Thread
RE: Retrieving 2 or more values from a DB query - by egun - 09-04-2009, 07:48 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Query regarding "Call" statement anupam4j 1 2,071 09-26-2014, 01:46 PM
Last Post: vinod123
  Retrieving data from web table nsuresh316 1 3,159 03-03-2014, 08:29 AM
Last Post: basanth27
  Data Table Query Suma Parimal 4 4,837 01-21-2014, 12:50 PM
Last Post: Suma Parimal
  UFT Query invisible786 0 1,933 01-15-2014, 09:41 PM
Last Post: invisible786
  Retrieving data from Txt file into datatable kriday 3 5,850 07-23-2013, 11:04 AM
Last Post: vinod123

Forum Jump:


Users browsing this thread: 2 Guest(s)