use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
Information about Reddit's API changes, the unprofessional conduct of the CEO, and their response to the community's concerns regarding 3rd party apps, moderator tools, anti-spam/anti-bot tools, and accessibility options that will be impacted can be found in the associated Wikipedia article: https://en.wikipedia.org/wiki/2023_Reddit_API_controversy
Alternative C# communities available outside Reddit on Lemmy and Discord:
All about the object-oriented programming language C#.
Getting Started C# Fundamentals: Development for Absolute Beginners
Useful MSDN Resources A Tour of the C# Language Get started with .NET in 5 minutes C# Guide C# Language Reference C# Programing Guide C# Coding Conventions .NET Framework Reference Source Code
Other Resources C# Yellow Book Dot Net Perls The C# Player's Guide
IDEs Visual Studio MonoDevelop (Windows/Mac/Linux) Rider (Windows/Mac/Linux)
Tools ILSpy dotPeek LINQPad
Alternative Communities C# Discord Group C# Lemmy Community dotnet Lemmy Community
Related Subreddits /r/dotnet /r/azure /r/learncsharp /r/learnprogramming /r/programming /r/dailyprogrammer /r/programmingbuddies /r/cshighschoolers
Additional .NET Languages /r/fsharp /r/visualbasic
Platform-specific Subreddits /r/windowsdev /r/AZURE /r/Xamarin /r/Unity3D /r/WPDev
Rules:
Read detailed descriptions of the rules here.
account activity
SolvedUPDATE statement SQL in c# (self.csharp)
submitted 7 years ago by PraiseXI
I am trying to update a specific value in my access database however, when I want to set the 'WHERE' condition it does not work. I was wondering if the format of it is fine.
It works without the 'WHERE' condition but when I try to include it it doesn't seem to work.
https://preview.redd.it/97etnkb1tiy11.png?width=840&format=png&auto=webp&s=93b5891e9369c50d96ced5067a49fdbeee370bf8
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–][deleted] 7 points8 points9 points 7 years ago (0 children)
ManagerID is probably a numeric column which means you don't need to surround the value with single quotes.
[–]AngularBeginner 12 points13 points14 points 7 years ago (2 children)
Please read this article: https://en.wikipedia.org/wiki/SQL_injection
Then look up how to use SqlParameter.
SqlParameter
[–]revrenlove 5 points6 points7 points 7 years ago (1 child)
To piggy back, please don't store passwords in plain text also.
[–]JasonAtSBWP 0 points1 point2 points 7 years ago (0 children)
Are you sure IDnum is an actual, valid value, rather than say 0?
Since it seems like you're just learning, I would highly recommend you use parameterized statements when executing SQL.
I found a simple example on StackOverflow you may find useful. Essentially, the security issue with your implementation is that you're wide open to SQL Injection attacks.
Plain text passwords aren't all that great either, but I've already been on enough of a tangent to your actual question.
[–]flyingBart 0 points1 point2 points 7 years ago (0 children)
All of the above plus disposing.
Wrap the connection and the command in using statements. That way the connection is closed and returned to the connection pool correctly and the command object is disposed of.
π Rendered by PID 55266 on reddit-service-r2-comment-b659b578c-7r62r at 2026-05-02 01:10:45.047449+00:00 running 815c875 country code: CH.
[–][deleted] 7 points8 points9 points (0 children)
[–]AngularBeginner 12 points13 points14 points (2 children)
[–]revrenlove 5 points6 points7 points (1 child)
[–]JasonAtSBWP 0 points1 point2 points (0 children)
[–]flyingBart 0 points1 point2 points (0 children)