locked
Data Designer Questions RRS feed

  • Question

  • I know, I am making this hard than it needs to be. I've not used the Dataset Designer since I stopped using it in VB 6, I thought I'd give it another try....

    What I can't figure out is how, in code, is to open a datatable what has a parameter and loop threw the rows in the table.....   Any pointers?

    Also, and Pro's and Con's to using the data designer? I gave it up years ago, because I preferred having more control over my datasets.

    Tuesday, October 13, 2015 1:38 AM

Answers

  • >>>What I can't figure out is how, in code, is to open a datatable what has a parameter and loop threw the rows in the table.....   Any pointers?

    There are many examples on the internet for that, this is one for Typed DataSet:

    http://stackoverflow.com/questions/14606475/looping-through-a-strongly-typed-dataset

    Dim DS as new DataSetSchedules
    
        DT = DS.Tables(0)'You can use the table name instead of the index also
    
     For Each DR as DataRow In DT.Rows
       ' Code
     Next

    >>>Also, and Pro's and Con's to using the data designer? I gave it up years ago, because I preferred having more control over my datasets.

    I don't what do you mean by "having more control on my Datasets". Search for Typed DataSet vs Untyped DataSet to see the difference.

    http://net-informations.com/faq/ado/typed-dataset.htm


    Fouad Roumieh

    Wednesday, October 14, 2015 5:37 AM
  • Hello,

    Depending on your requirements and back end database I would highly suggest looking into Entity Framework if not using MS-Access as a database. Overall working with data with EF is a richer experience. 

    Also consider looking at the following page (specifically the windows forms examples) for typed data sets.

    Otherwise Fouad Roumieh has pointed you in the right direction. 


    Please remember to mark the replies as answers if they help and unmark them if they provide no help, this will help others who are looking for solutions to the same or similar problem. Contact via my webpage under my profile but do not reply to forum questions.
    Microsoft Developer tools
    Developer’s Guide to Windows 10 video series

    Wednesday, October 14, 2015 10:16 AM

All replies

  • I know, I am making this hard than it needs to be. I've not used the Dataset Designer since I stopped using it in VB 6, I thought I'd give it another try....

    What I can't figure out is how, in code, is to open a datatable what has a parameter and loop threw the rows in the table.....   Any pointers?

    Also, and Pro's and Con's to using the data designer? I gave it up years ago, because I preferred having more control over my datasets.

    Any help here?

    Wednesday, October 14, 2015 4:25 AM
  • >>>What I can't figure out is how, in code, is to open a datatable what has a parameter and loop threw the rows in the table.....   Any pointers?

    There are many examples on the internet for that, this is one for Typed DataSet:

    http://stackoverflow.com/questions/14606475/looping-through-a-strongly-typed-dataset

    Dim DS as new DataSetSchedules
    
        DT = DS.Tables(0)'You can use the table name instead of the index also
    
     For Each DR as DataRow In DT.Rows
       ' Code
     Next

    >>>Also, and Pro's and Con's to using the data designer? I gave it up years ago, because I preferred having more control over my datasets.

    I don't what do you mean by "having more control on my Datasets". Search for Typed DataSet vs Untyped DataSet to see the difference.

    http://net-informations.com/faq/ado/typed-dataset.htm


    Fouad Roumieh

    Wednesday, October 14, 2015 5:37 AM
  • Hello,

    Depending on your requirements and back end database I would highly suggest looking into Entity Framework if not using MS-Access as a database. Overall working with data with EF is a richer experience. 

    Also consider looking at the following page (specifically the windows forms examples) for typed data sets.

    Otherwise Fouad Roumieh has pointed you in the right direction. 


    Please remember to mark the replies as answers if they help and unmark them if they provide no help, this will help others who are looking for solutions to the same or similar problem. Contact via my webpage under my profile but do not reply to forum questions.
    Microsoft Developer tools
    Developer’s Guide to Windows 10 video series

    Wednesday, October 14, 2015 10:16 AM
  • Just for the record, there was no DataSet in VB6 the only thing in that version was the Recordset (comparable with a connected datatable).

    I find it always difficult to reply on questions which are in the question incorrect and give an assumption of knowledge which is probably not the fact existing.


    Success
    Cor

    Wednesday, October 14, 2015 12:25 PM
  • thanks
    Wednesday, October 14, 2015 12:32 PM
  • Thank you... I will look into that.
    Wednesday, October 14, 2015 12:32 PM
  • I can say, I've never missed a reply from Cor..............
    Wednesday, October 14, 2015 12:33 PM
  • I can say, I've never missed a reply from Cor..............

    Yea replies from LandLord324 are easier to handle. 

    But I'm always impressed that persons can write things like "what is better", "pro's and con's"

    It is always related to the point of view. 

    1. What are the pro's and con's about man
    2. What is better a man or a a woman.

    For me the same impossible to answer questions likewise the one you have stated. It is always related to a certain environment and a certain situation.

    But I know, some people think, let me socialize and ask a question to the forum. Those get this kind of replies from me. 



    Success
    Cor


    • Edited by Cor Ligthert Wednesday, October 14, 2015 12:51 PM
    Wednesday, October 14, 2015 12:50 PM