Stay With us
3 new comments

beginner
new

Help & Settings
About
Help
Tips

How to add Data to SQL server in Windows Form

I have a basic windows form app in which i can get data from a particular table User. Now i want to send data to SQL server and store in table. I have three columns to be inserted which are

  • user_name
  • user_email
  • user_password

But my SQL query does not seems to be running. Here is the SQL query created by me

string query = string.Format("INSERT INTO user (user_name, user_email, user_password) VALUES ('{0}','{1}','{2}')", userName, userEmail, userPass);

Now the problem is that i does not know that how to execute that query. Can anyone help me here?

(1) Replies

Please login or register to Comment or Answer