P
pmclinn
I was wondering if it is possible to dynamically create a structure.
Something like this:
public sub main
sql = "Select Col1, Col2 from Table a"
dim al as new arraylist
al = LoadOracleData(sql)
'____Do amazing things
end sub
Private Function LoadOracleData(SQL as string) as arraylist
dim al as new arraylist
'...Parse out SQL Column names
'Use these names as the objects in the structure
'Structure Sample
'Dim Col1 as string
'Dim Col2 as string
'Load data into Structure sample and add to arraylist
'OLE/ODBC Connection
for...
al.add(sample structure)
Loop
return arraylist 'of structure
end function
I understand that datatypes should also be implimented...but for the
purposes of learning how to do this I have left it out....
-Peter
Something like this:
public sub main
sql = "Select Col1, Col2 from Table a"
dim al as new arraylist
al = LoadOracleData(sql)
'____Do amazing things
end sub
Private Function LoadOracleData(SQL as string) as arraylist
dim al as new arraylist
'...Parse out SQL Column names
'Use these names as the objects in the structure
'Structure Sample
'Dim Col1 as string
'Dim Col2 as string
'Load data into Structure sample and add to arraylist
'OLE/ODBC Connection
for...
al.add(sample structure)
Loop
return arraylist 'of structure
end function
I understand that datatypes should also be implimented...but for the
purposes of learning how to do this I have left it out....
-Peter