locked
Adding data to a table RRS feed

  • Question

  • I would like the most direct way to add data to a defined table in a database I have created. In a previous version of VS, I was able to do this easily but the method I had used seems to have disappeared. Does it amount to creating a stream of sql insert

    statements or is there some less tedious way to get me there?  I was doing this before windows and now I am trying to catch up to do it in my VS2013 environment.

    Saturday, June 20, 2015 1:03 PM

Answers

  • There are many different ways of adding data to a table.

    1. You could add rows  to a DataSet and then update the database.

    2. You could execute T-SQL Insert statements that you contructed with strings.

    3. You coulduse Linq objects to create and save rows.

    So my question to you would be, which method do you prefer?

    Here are links to each method:

    1. https://msdn.microsoft.com/en-us/library/ceab2k93.aspx?f=255&MSPPError=-2147217396

        https://msdn.microsoft.com/en-us/library/y2ad8t9c.aspx

    2. https://msdn.microsoft.com/en-us/library/tyy0sz6b.aspx

    3. https://msdn.microsoft.com/en-us/library/bb397926.aspx

    • Marked as answer by elisch123 Sunday, June 21, 2015 1:44 PM
    Saturday, June 20, 2015 2:10 PM

All replies

  • There are many different ways of adding data to a table.

    1. You could add rows  to a DataSet and then update the database.

    2. You could execute T-SQL Insert statements that you contructed with strings.

    3. You coulduse Linq objects to create and save rows.

    So my question to you would be, which method do you prefer?

    Here are links to each method:

    1. https://msdn.microsoft.com/en-us/library/ceab2k93.aspx?f=255&MSPPError=-2147217396

        https://msdn.microsoft.com/en-us/library/y2ad8t9c.aspx

    2. https://msdn.microsoft.com/en-us/library/tyy0sz6b.aspx

    3. https://msdn.microsoft.com/en-us/library/bb397926.aspx

    • Marked as answer by elisch123 Sunday, June 21, 2015 1:44 PM
    Saturday, June 20, 2015 2:10 PM
  • What was that previous version (1998) because since 2002 nothing is disappeared?

    Otherwise be clear, it sounds now that you have not made a correct backup but nobody can help you with that.


    Success
    Cor


    Saturday, June 20, 2015 4:23 PM
  • The previous version I allude to is the VS2010 that I learned to use to accomplish what I was seeking.  Tho each new version retains the same capabilities, there are differences in its presentation.  Sometimes the more elegant or more efficient presentation of a new version is lost on relative novices as myself.
    Sunday, June 21, 2015 2:03 PM