C
C#Mete

data update error in c# sql

I want to change the password of the user in the database. I get the password changed warning on the code side, but there is no update in the database.
No description
No description
J
Jimmacle12d ago
you aren't checking if the query actually modified anything without seeing your database i can only assume your query is incorrect
M
mtreit12d ago
👀
No description
J
Jimmacle12d ago
i'm choosing to ignore the plaintext password because it's probably a school assignment
S
SpReeD12d ago
For starters, stick to C# naming conventions or better naming conventions at all. Name C# methods & objects Pascal-Case, be consistent in your SQL queries uppercasing keywords like SELECT not Select or mixing both throughout your codebase. Besides this, use the universal science language for all in-code names, English. We can only assume what things like beglanti might be. Use Gates before executing parametrized queries, e.g. the Text property of your textbox might be null or empty, which will result in an exception. Never use or store plain-text passwords, use appropriate hashes. Encapsulate UI functions from the business-logic. ExecuteNonQuery is a function, it returns the affected rows in int, use this to verify the query.
M
Mete11d ago
Thanks for your comments. The program was giving an error because I used 2 'FrmSifreYenileme' objects. I deleted one and it was fixed.
Want results from more Discord servers?
Add your server
More Posts
ASP Core 8 - Custom 404 HandlingI have a few scenarios where I need to show a different kind of view and a bit of different logic deAdd suffix to version without it showing up as a prereleaseI'm writing a lib that wraps a bunch of external GRPC APIs and exposes them via the same interface. Help refactor serviceHi! I have data of many `Station` models. Their information updates every ~60 minutes. I need to sto✅ looking for help/contributorsDotmenu is a straightforward console menu library designed to streamline user interactions in consolHow to find relative file path for file inside of project?Dealing with a C# console application, I have a folder inside the project named Files and inside thaPassing parameters to overloaded constructorHow would I pass the texture2D variable to be handled in the second constructor. Obviously return doI am trying to store data in database using EF my code run fine but its not storing dataif (response.IsSuccessStatusCode) { var json = await resUsing ref for large data types.Hi, just looking for a little clarification on the *ref* keyword when passing data into a function. crud operations with blazor serverI have a backend that I built and now I want to use it with api calls. I created same model with bacminor glitch, player twitchingso i have a glitch where the player starts "twitching" when you walk beside a block or just on a blo✅ BackgroundWorker getting progressI have a winform applications and with this I have put a ProgressBar on it. I was manually changing My tech stack, what to focus now?- .NET Core - Entity Framework Core (Code First) - MVC - Web API - Identity and JWT - Mediator & CQRBuild Issue due to $(Platform) valueWe are facing build issue when we try to build .net project in custom project configuration, like DePFX certificate for signing the application packageI am trying to use a certificate from azure key vault, but it says that it is invalid or another rea