call a function in a function declaration within the same class

Hello,
I have one VB class file : CLS

I have a function FCT1 as dataset declared in the CLS.
I want to have another function FCT2 that also return a dataset based on FCT1.
So in the FCT2 declaration i defined a dataview dv,
Why i cannot write :
dv = FCT1.Tables("datasetName")

How can i base my operation in the FCT2 on the dataset returned from FCT1?
thanks
Nyana22Asked:
Who is Participating?
 
Jorge PaulinoConnect With a Mentor IT Pro/DeveloperCommented:
It generates a customized view of the DataTable. If you use only FCT1.Tables("datasetName") you return a DataTable and not a DataView as you have declared in the function 2.
0
 
Jorge PaulinoIT Pro/DeveloperCommented:
Have you tried
dv = FCT1.Tables("datasetName").DefaultView
 
0
 
Nyana22Author Commented:
no,
but i guess it worked
what default view did??
thanks
0
Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

 
Nyana22Author Commented:
ok thanks a lot,
one last thing:
if FCT1 returns a datatable with f1,f2,f3,f4.
how can i choose in my dataview f1,f2?
thanks a lot
0
 
Nyana22Author Commented:
f1...f4 are fields in the datatable
0
 
Jorge PaulinoIT Pro/DeveloperCommented:
What are f1,f2,f3, ... ? Records ?
0
 
Nyana22Author Commented:
they are column.
0
 
Jorge PaulinoIT Pro/DeveloperCommented:
Why do you want that ?
You then can get the single column using dv.Item("ColumnName")
 
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.