How can i solve this incorrect syntax problem? [closed] - c#

Closed. This question needs debugging details. It is not currently accepting answers.
Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question.
Closed 2 years ago.
Improve this question
I am making an app for product list. It is running but there is an error when I try to update or delete some cell. I can add new product but i can not delete or update.
the error is
Topic: 'Incorect syntax near')'.'
it seems near command.ExecuteNonQuery();

In this screenshot, you have a little typo - https://i.hizliresim.com/JjhDBo.jpg - remove the ) after #Id in your SQL command, and you should be good to go!
Also in future, would you please add the code you think has the error, in-line with your message - would make it much easier for someone else to assist you, rather than having to open up all the screenshot links you've posted and read through them :)

Related

a legacy screen was translated to the a web page (asp.net). the screen is multi text lines screen - users can't copy and paste multiple lines & paste [closed]

Closed. This question needs debugging details. It is not currently accepting answers.
Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question.
Closed 7 days ago.
Improve this question
multiline screen
A user cannot copy these lines and paste them in the same order. all it allows them is copy a line at a time. Please advise a way to achieve this
I am not a web person - i'm looking out for a solution/any advise on how this can be achieved.

Which of the following SQL statement should you use? [closed]

Closed. This question needs debugging details. It is not currently accepting answers.
Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question.
Closed 1 year ago.
Improve this question
I am brand new to C# and to stackoverflow. I am reviewing questions that I got wrong on a prep test for my MTA certification. Can anyone help me understand what the correct answer is and why? Thank you!
enter image description here
The correct answer would be A
Firstly it says update only those whose reference is TKY, all answers deal with that.
Secondly the updated region should be Japan, so that rules out B and C
Finally the update should only affect customers in Tokyo, so that leaves only A since it's the only one of the four to limit the update with and city='TOKYO'.

I am trying to insert total of 4 subjects and their average in database from asp.net, its showing successfully added but not actually adding [closed]

Closed. This question needs debugging details. It is not currently accepting answers.
Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question.
Closed 5 years ago.
Improve this question
I am trying to develop a web application which can add 4 subjects and average them and save it to database,. All things are correct still i am facing a problem. I tried many solutions but not working
After executing the web application i insert all the elements as required and even it shows up "1 record successfully added" but in actually its not adding in database. So can anyone help me out ?
1
You are missing the ExecuteNonQuery() to execute the query for inserting the row into the database table.
SqlCommand.ExecuteNonQuery Method ()
You must add the below line to your click event after parameter passing part.
code
cmd.ExecuteNonQuery();
Also, it returns the number of rows affected.
int rowsAffected = cmd.ExecuteNonQuery();

How to fix show method while using MetroMessageBox [closed]

Closed. This question needs debugging details. It is not currently accepting answers.
Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question.
Closed 6 years ago.
Improve this question
Right now I am exploring the modern metroframework in c# but right now I got stuck with this one thing.
If I make a MetroMessageBox by doing the following:
MetroMessageBox.Show("", "", MessageBoxButtons.OK, MessageBoxIcon.Warning);
I get a red line under my 'show' . The error in the errorlist tells me the following: No overload for method 'Show' takes 4 arguments.
I already thank you all for the help
MetroMessageBox.Show() has other parameters than a Windows Forms MessageBox.
MetroMessageBox.Show(this, "MessageText", "TitleText")
You can use
MetroFramework.MetroMessageBox.Show(this, "Your message here.","Title Here",
MessageBoxButtons.OK,MessageBoxIcon.Warning);

How to get the default gateway of a router where I connected using C#? [closed]

Closed. This question needs debugging details. It is not currently accepting answers.
Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question.
Closed 8 years ago.
Improve this question
I can't figure out how to get it. I googled a lot since yesterday and I do not found any answer.
Any Ideas?
Loop through NetworkInterface.GetAllNetworkInterfaces() until you find the one you want, then look at GetIPProperties().GatewayAddresses.

Categories

Resources