Skip to content
Advertisement

Tag: sql-server-express

SQL Insert Query Using C#

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) A new line was inserted and everything worked fine, now I tried to insert a row using variables: Didn’t work, no values were inserted. I tried

SQL/C# – Best method for executing a query

I need to execute a sql query from within a c# class. I have thought of 2 options Starting a process of sqlcmd. Using a SqlCommand object. My question is which would be the better way? It’s important that the solution only holds a connection to the server for a short time. I’m open to other ideas if the above

Advertisement