none
problem in my project dataSet designer. RRS feed

  • Question

  • hi

    i have a problem in my project dataSet designer, when run dataSet configuration wizard. if i open dataset configuration wizard and hit continue with wizard, in tables treeView i see some tables which is not checked whereas that tables already exists in my dataSet.

    does something wrong ?

    thanks in advance


    http://www.codeproject.com/KB/codegen/DatabaseHelper.aspx
    Wednesday, December 28, 2011 4:20 PM

All replies

  • Hi Hamed,

    Welcome to the MSDN forum!

    I'm moving the thread to ADO.NET DataSet Forum for better support.

    Thank you.

    Yoyo.


    Yoyo Jiang[MSFT]
    MSDN Community Support | Feedback to us
    Monday, January 2, 2012 3:52 AM
    Moderator
  • any help ?
    http://www.codeproject.com/KB/codegen/DatabaseHelper.aspx
    Monday, January 2, 2012 8:44 AM
  • Hi Hamed,

    Welcome!

    I'm not very sure about your question from your discription. When we follow the wizard, you can use Query Builder to add table in your DataSet. Would you please give us your screenshoot here, thanks for understanding.

    Have a nice day.


    Alan Chen[MSFT]
    MSDN Community Support | Feedback to us
    Get or Request Code Sample from Microsoft
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    Monday, January 2, 2012 9:08 AM
    Moderator
  • Sure!

    plz see this image :

    As you can see in above image, the tables which highlight with red rectangle does not checked, but these tables exists in my dataSet.


    http://www.codeproject.com/KB/codegen/DatabaseHelper.aspx
    Wednesday, January 11, 2012 7:41 PM
  • Wow ... do you have your entire database in ONE DataSet? Why? I know that my post is a bit off-topic, but typically DataSets should reflect the functionality that they're being used for, not as a repository for your entire database!!

    For example, I  notice in your Forms, that you have one for DrugStore. I notice in your database tables that you have some tables that might be specific to a Drug Store form, such as DrugDelivers, DrugStoreCash, etc.  Perhaps you'd have a DrugStoreDataSet just for use with your DrugStore forms, and only containing the relevant tables.

    Likewise, you'd probably want to have a LaboratoryDataSet for use with your Laboratory forms, an InsuranceDataSet for use with Insurance forms ... etc.etc.etc.  

    Sorry for being off-topic, but I fear that you're heading down the wrong path by using what appears to be one DataSet that models your entire database.


    ~~Bonnie Berent [C# MVP]

    geek-goddess-bonnie.blogspot.com
    Thursday, January 12, 2012 3:17 PM
  • Wow ... do you have your entire database in ONE DataSet? Why? I know that my post is a bit off-topic, but typically DataSets should reflect the functionality that they're being used for, not as a repository for your entire database!!

    For example, I  notice in your Forms, that you have one for DrugStore. I notice in your database tables that you have some tables that might be specific to a Drug Store form, such as DrugDelivers, DrugStoreCash, etc.  Perhaps you'd have a DrugStoreDataSet just for use with your DrugStore forms, and only containing the relevant tables.

    Likewise, you'd probably want to have a LaboratoryDataSet for use with your Laboratory forms, an InsuranceDataSet for use with Insurance forms ... etc.etc.etc.  

    Sorry for being off-topic, but I fear that you're heading down the wrong path by using what appears to be one DataSet that models your entire database.


    ~~Bonnie Berent [C# MVP]

    geek-goddess-bonnie.blogspot.com

    Hi

    thanks for your guidance.

    yes, it's very hard to work, but i don't know how to use multiple dataSets, becuase some tables is needed for all sub Systems. for example we are some tables named : Objects, Security, Actions, Logs, Users, Roles, UserInRoles, etc which is common and use for all sub systems. i don't know should i include these tables to each dataSet or not!

    what's your idea ?

    thanks in advance


    http://www.codeproject.com/KB/codegen/DatabaseHelper.aspx
    Thursday, January 12, 2012 3:36 PM
  • Personally, I would have used separate projects for various functionality rather than one big project as you have done. In my scenario, I would have one project only for DataSets, and reference the DataSet DLL in my other projects. Rather than re-arrange your solution at this stage, you should maybe try organizing your DataSets into a Folder, as you've done for your Forms, Classes, Reports, etc..

    OK, so you've given me some examples of the types of DataSets you'd need. For example, a SecurityDataSet might include Security, Users, Roles, etc.  Yes, you might need to use that SecurityDataSet everywhere, but that's ok. Use it everywhere. There's absolutely nothing wrong with using multiple DataSets in a Form if necessary.

    You might also consider having a class that handles all the security stuff. In this scenario, a Form doesn't need to know anything about the SecurityDataSet. That's being set up and used by the Security class (it could even be a singleton). The Form only needs to instantiate the Security class, and call methods on it that indicate whether a user is authorized for certain functions, or whatever your security needs are.


    ~~Bonnie Berent [C# MVP]

    geek-goddess-bonnie.blogspot.com
    Thursday, January 12, 2012 4:08 PM
  • Personally, I would have used separate projects for various functionality rather than one big project as you have done. In my scenario, I would have one project only for DataSets, and reference the DataSet DLL in my other projects. Rather than re-arrange your solution at this stage, you should maybe try organizing your DataSets into a Folder, as you've done for your Forms, Classes, Reports, etc..

    OK, so you've given me some examples of the types of DataSets you'd need. For example, a SecurityDataSet might include Security, Users, Roles, etc.  Yes, you might need to use that SecurityDataSet everywhere, but that's ok. Use it everywhere. There's absolutely nothing wrong with using multiple DataSets in a Form if necessary.

    You might also consider having a class that handles all the security stuff. In this scenario, a Form doesn't need to know anything about the SecurityDataSet. That's being set up and used by the Security class (it could even be a singleton). The Form only needs to instantiate the Security class, and call methods on it that indicate whether a user is authorized for certain functions, or whatever your security needs are.


    ~~Bonnie Berent [C# MVP]

    geek-goddess-bonnie.blogspot.com

    Thanks

    So, what's your idea about should i include these common tables to each dataSet or not ?

    (because updating database is transactionaly (TableAdapterManager.UpdateAll) we generate tableAdapterManager base on my custom class via reflection and pass my whole dataSet to update database, another note is in my Save method which calls UpdateAll, we do some actions such as security checking, logging and other actions which need to access common tables in each dataSet).


    http://www.codeproject.com/KB/codegen/DatabaseHelper.aspx
    Thursday, January 12, 2012 4:39 PM
  • But, it sounds like you never update those security checking tables, you just use them for authorizing users/roles and that sort of thing. I think you can have them in a separate DataSet, I don't think that they don't need to be included in every DataSet.


    ~~Bonnie Berent [C# MVP]

    geek-goddess-bonnie.blogspot.com
    Friday, January 13, 2012 4:01 PM
  • Many thanks

    but my main problem still does not solved (which i explained in first post)!!

    can u help me ?


    http://www.codeproject.com/KB/codegen/DatabaseHelper.aspx
    Friday, January 13, 2012 10:39 PM