SQL Insert Query Using C#

后端 未结 8 1776
长情又很酷
长情又很酷 2020-11-27 17:24

I\'m having an issue at the moment which I am trying to fix. I just tried to access a database and insert some values with the help of C#

The things I tried (worked)

8条回答
  •  野性不改
    2020-11-27 18:11

    The most common mistake (especially when using express) to the "my insert didn't happen" is : looking in the wrong file.

    If you are using file-based express (rather than strongly attached), then the file in your project folder (say, c:\dev\myproject\mydb.mbd) is not the file that is used in your program. When you build, that file is copied - for example to c:\dev\myproject\bin\debug\mydb.mbd; your program executes in the context of c:\dev\myproject\bin\debug\, and so it is here that you need to look to see if the edit actually happened. To check for sure: query for the data inside the application (after inserting it).

提交回复
热议问题