15,898,588 members
Sign in
Sign in
Email
Password
Forgot your password?
Sign in with
home
articles
Browse Topics
>
Latest Articles
Top Articles
Posting/Update Guidelines
Article Help Forum
Submit an article or tip
Import GitHub Project
Import your Blog
quick answers
Q&A
Ask a Question
View Unanswered Questions
View All Questions
View C# questions
View C++ questions
View Javascript questions
View Visual Basic questions
View Python questions
discussions
forums
CodeProject.AI Server
All Message Boards...
Application Lifecycle
>
Running a Business
Sales / Marketing
Collaboration / Beta Testing
Work Issues
Design and Architecture
Artificial Intelligence
ASP.NET
JavaScript
Internet of Things
C / C++ / MFC
>
ATL / WTL / STL
Managed C++/CLI
C#
Free Tools
Objective-C and Swift
Database
Hardware & Devices
>
System Admin
Hosting and Servers
Java
Linux Programming
Python
.NET (Core and Framework)
Android
iOS
Mobile
WPF
Visual Basic
Web Development
Site Bugs / Suggestions
Spam and Abuse Watch
features
features
Competitions
News
The Insider Newsletter
The Daily Build Newsletter
Newsletter archive
Surveys
CodeProject Stuff
community
lounge
Who's Who
Most Valuable Professionals
The Lounge
The CodeProject Blog
Where I Am: Member Photos
The Insider News
The Weird & The Wonderful
help
?
What is 'CodeProject'?
General FAQ
Ask a Question
Bugs and Suggestions
Article Help Forum
About Us
Search within:
Articles
Quick Answers
Messages
Comments by Linux Goblin (Top 8 by date)
Linux Goblin
17-Jan-14 12:00pm
View
Marking your reply as the answer! Thank you ever so much!!! Must have been the case then null != to DBNull
Linux Goblin
17-Jan-14 11:37am
View
With no values in the table it is returning as "Object"
Linux Goblin
17-Jan-14 11:26am
View
Checked what you mentioned, if there is a value in the table it is successfully pulling the value (found what is causing the program to crash) HOWEVER when there is no value in the table scalarVar does return blank but it still registers as a value so it is jumping to the ELSE statement (maybe because it isn't DBNull?)
Linux Goblin
17-Jan-14 10:51am
View
Hi, yes I was using a MySQLException instead so that is why it was crashing (was using it at the time since there was a lot of interaction with DB's). After using the break points, it gets to the IF statement then jumps straight to the else. I have a feeling it is partially due to the SQL query but then again if nothing is in the table then scalarVal should be NULL and then do something else
Linux Goblin
17-Jan-14 9:40am
View
Hi, I've just tried what you've said and changed the code up a bit, I now get the following error: "An unhandled exception of type 'System.ArgumentException' occurred in MySql.Data.dll
Additional information: You have specified an invalid column ordinal."
Linux Goblin
19-Dec-13 10:22am
View
It worked! Thank you ever so much!!! Can log in now using right credentials and it rejects the bad ones. So by changing the wildcard to username, that has managed to resolve the issue partially along with the executescalar
Linux Goblin
19-Dec-13 10:01am
View
Well it is working to an extent, when using wrong credentials it brings up "Wrong Username or Password" and when I use the right credentials it also brings up "Wrong Username or Password"
Linux Goblin
19-Dec-13 9:56am
View
Hi joginder-banger, thank you for your quick reply! Sadly I am now unable to log in when using the same credentials
Show More