none
Data Class RRS feed

  • Question

  • hi,

    Can you please advise how can i add data using this scenario?


    Public Class PurchaseOrder 
        public ItemsOrders () As Item
    End Class
    Public Class Item
        Public ItemID As String
        Public ItemPrice As decimal
    End Class


    Thanks
    Monday, February 9, 2009 10:57 PM

Answers

  • Now if what you mean is that you want to take data from your VB.Net Structures and send data to a database I would review the following msdn information

    http://msdn.microsoft.com/en-us/library/system.data.sqlclient.sqlconnection.aspx

    This will allow you to write code to connect to a database. Then you will need to create the right sql command and send this to the database to update the data.

    For future reference. This is NOT a forum for ANY questions. Specifically this forum is System.Data.DataSet. You can read about this component here
    http://msdn.microsoft.com/en-us/library/system.data.dataset.aspx

    If you have a specific Dataset question please go ahead and ask it here. Now if you have questions on how to create Connections to database I would instead review the following forum.
    http://social.msdn.microsoft.com/forums/en-US/adodotnetdataproviders/threads/

    Now one of the things you seem to want to do is have objects and connect and update to a database. I would look into the following component Entity Framework
    http://msdn.microsoft.com/en-us/library/aa697427(VS.80).aspx

    If you have any specific questions on any of these related issues please post a question there and other people with more knowledge in these areas will give you effective answers. I would also refine your question and be more precise about the problem you are having. Write a longer post and try to include code if possible.

    Thanks
    Chris Robinson
    Program Manager - Dataset
    This posting is provided "AS IS" with no warranties, and confers no rights.
    Wednesday, February 11, 2009 3:32 AM

All replies

  • You should be more specific about what you are trying to achieve. Could you please provide more details?
    Val Mazur (MVP) http://www.xporttools.net
    Tuesday, February 10, 2009 11:15 AM
    Moderator
  • hi,

        I was trying to add data to the classes so i can serialize it. I've tyied to add references to the classes and use them like i use arrays, but i dont know how to refer to the class "item" in order to add new items (childs of PurchaseOrder).

        Thanks
    Tuesday, February 10, 2009 3:21 PM
  • Now if what you mean is that you want to take data from your VB.Net Structures and send data to a database I would review the following msdn information

    http://msdn.microsoft.com/en-us/library/system.data.sqlclient.sqlconnection.aspx

    This will allow you to write code to connect to a database. Then you will need to create the right sql command and send this to the database to update the data.

    For future reference. This is NOT a forum for ANY questions. Specifically this forum is System.Data.DataSet. You can read about this component here
    http://msdn.microsoft.com/en-us/library/system.data.dataset.aspx

    If you have a specific Dataset question please go ahead and ask it here. Now if you have questions on how to create Connections to database I would instead review the following forum.
    http://social.msdn.microsoft.com/forums/en-US/adodotnetdataproviders/threads/

    Now one of the things you seem to want to do is have objects and connect and update to a database. I would look into the following component Entity Framework
    http://msdn.microsoft.com/en-us/library/aa697427(VS.80).aspx

    If you have any specific questions on any of these related issues please post a question there and other people with more knowledge in these areas will give you effective answers. I would also refine your question and be more precise about the problem you are having. Write a longer post and try to include code if possible.

    Thanks
    Chris Robinson
    Program Manager - Dataset
    This posting is provided "AS IS" with no warranties, and confers no rights.
    Wednesday, February 11, 2009 3:32 AM