How to add a new row to an existing table using c# sql server

后端 未结 4 689
长发绾君心
长发绾君心 2021-01-19 05:17

I need to write a program. A part of the program is to write to an sql database (.mdf). I had a lot of trouble trying to add a new row to my table (called: \"Data\"). Here i

4条回答
  •  再見小時候
    2021-01-19 05:36

    Two things I'm seeing, you're not initializing your Dataset (ds) or SqlDataAdapter (da) in anyway (unless you're simply leaving that out for post simplification). Part of the initialization of the da will be giving it an actual sql command.

提交回复
热议问题