[Webinar] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

call a function in a function declaration within the same class

Posted on 2009-04-30
8
Medium Priority
?
212 Views
Last Modified: 2012-05-06
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
0
Comment
Question by:Nyana22
  • 4
  • 4
8 Comments
 
LVL 48

Expert Comment

by:jpaulino
ID: 24273672
Have you tried
dv = FCT1.Tables("datasetName").DefaultView
 
0
 

Author Comment

by:Nyana22
ID: 24273751
no,
but i guess it worked
what default view did??
thanks
0
 
LVL 48

Accepted Solution

by:
jpaulino earned 2000 total points
ID: 24273796
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
Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

 

Author Comment

by:Nyana22
ID: 24273926
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
 

Author Comment

by:Nyana22
ID: 24273940
f1...f4 are fields in the datatable
0
 
LVL 48

Expert Comment

by:jpaulino
ID: 24273946
What are f1,f2,f3, ... ? Records ?
0
 

Author Comment

by:Nyana22
ID: 24274038
they are column.
0
 
LVL 48

Expert Comment

by:jpaulino
ID: 24274315
Why do you want that ?
You then can get the single column using dv.Item("ColumnName")
 
0

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

A quick way to get a menu to work on our website, is using the Menu control and assign it to a web.sitemap using SiteMapDataSource. Example of web.sitemap file: (CODE) Sample code to add to the page menu: (CODE) Running the application, we wi…
Problem Hi all,    While many today have fast Internet connection, there are many still who do not, or are connecting through devices with a slower connect, so light web pages and fast load times are still popular.    If your ASP.NET page …
Integration Management Part 2
Look below the covers at a subform control , and the form that is inside it. Explore properties and see how easy it is to aggregate, get statistics, and synchronize results for your data. A Microsoft Access subform is used to show relevant calcul…
Suggested Courses

868 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question