I've tried searching around, but most of the answers were about instantiating a list that doesn't exist or otherwise isn't exactly what I'm looking for. Most of the questions I've come across weren't using the "new" keyword.Here's what I've got:\[code\]using (SqlCmd cmd = new SqlCmd("SELECT * FROM [User] WHERE Login = @Login", false)){ cmd.AddIString....}\[/code\]My problem is on that first line. Visual Studio is fine with it until I try to run it. Then it throws an error \[code\]Object reference not set to an instance of an object\[/code\]. It threw the error even when it looked like:\[code\]using (SqlCmd cmd = new SqlCmd( "SELECT * " + "FROM [User] " + "WHERE Login = @Login", false)){ // Code here...}\[/code\]Any ideas? I've rewritten it, looked at other methods that do the exact same thing, used Google, etc for about 2 hours now with no real result. Closing Visual Studio didn't do anything either, except cause the same problem on code that was working previously.EDIT: I did say first line, but here it is a bit more clearly (Line 74):\[code\]Line 72: {Line 73: //using (SqlCmd cmd = new SqlCmd("SELECT * FROM [User] WHERE Login = @Login", false))Line 74: using (SqlCmd cmd = new SqlCmd("SELECT * FROM [User] WHERE Login = @Login", true))Line 75: {Line 76: cmd.AddIString("@Login", 100, login);\[/code\]