Link to home
Start Free TrialLog in
Avatar of hemalatha_sakthivel
hemalatha_sakthivel

asked on

Return dataset into an array?

I have a class called GroupDALC
iN THAT i HAVE A FUNCTION CALLED - pUBLIC FUNCTION gETGROUPLIST( ) AS ARRAY.
This method retrieves the grouplist information available in the qsr database and returns them in a dataset to the caller order by groupID field.

This has a stored procedure called psp_getgrouplist.

I don't know how to assign a dataset into an array and hoewto group it?
Avatar of posseke
posseke
Flag of Cabo Verde image

You can use a collection object, which can store allmost anything, going from strings to datasets

Po$$e
That would mean your function has to return another type:

public function Getgrouplist( ) as Collection.

You should try it!

Po$$e
Avatar of hemalatha_sakthivel
hemalatha_sakthivel

ASKER

Hi Posseke

Thanks for your response.. But i AM NOT CLEAR ABOUT THAT. hERE IS MUY CODE.,

Public Class GroupDALC

Public Function GetGroupList( )as array
'Code for sqlconnection string.
'Code for Sqlcommandtext(Where the stored procedure goes here.,as psp_gETgrouplist)
'GroupDALCdataset = sqlhelper.Executedataset(sqlconnectionstring,commandtype.storedprocedure,sqlcommandtext)

'Return dataset(Here only I have to know how to transform the dats in data set to array format)
End Function
End Class

OR IS THERE ANY OTHER WAY TO WRITE THIS CODE?

Please help me out.

Thanks

HHHH
ASKER CERTIFIED SOLUTION
Avatar of posseke
posseke
Flag of Cabo Verde image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Hey Thanks for your suggestion.

But the thing is I want to return as ARRAY only bcoz this function is by another function which also returns as array.
And My boss told to try using  INMEMORY ARRAYLIST to get the data from the dataset into the array.

So any Idea of using that InmemoryArraylist.

Let me know

I appreciate your help.

Thanks a lot Po$$e
Hi,

In reply to hemelatha's last question I don't know the answer so I stick with my final suggestion...

Greets,

Po$$e