Computing.Net > Forums > Programming > C# SQL Express

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

C# SQL Express

Reply to Message Icon

Name: dragonslayer300814
Date: May 5, 2009 at 13:00:09 Pacific
OS: Windows XP
Subcategory: C/C++
Comment:

Ok, so I have an SQL Express database, and I am using C#. I have successfully connected to the db within my program. I am having issues querying the db with parameters. Such as "SELECT * FROM USERS WHERE USERNAME = " + textBox1.Text, but if I just use SELECT * FROM USERS it works just fine, but I get all the data which I don't want. I get an exception saying invalid column name for whatever text I put in textBox1. I dunno if it's my SQL or what? I'm befuddled, please help. =)



Sponsored Link
Ads by Google
Reply to Message Icon

Related Posts

See More







Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Programming Forum Home


Sponsored links

Ads by Google


Results for: C# SQL Express

C++ & SQL www.computing.net/answers/programming/c-amp-sql/12703.html

New to c++ www.computing.net/answers/programming/new-to-c/15649.html

microsoft SQL 2000 & 2005 www.computing.net/answers/programming/microsoft-sql-2000-amp-2005/15747.html