TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Ernst
NA
3
0
Sql Parameters mysteriously disappear
Oct 23 2008 6:11 PM
Hey,
I have a little bit of a problem with my project. When I try to use SQL parameters in the way C# intended them, they don't work
In the following code, I try to get the parameters in, however, it hangs on "SqlException: Required parameter @Name was not supplied".
string command = "exec AuthPlayer";
SqlCommand Sql = new SqlCommand(command, MSSQL);
MSSQL.Open();
Sql.Parameters.AddWithValue("@Name", Name);
Sql.Parameters.AddWithValue("@Pass", DoSha1(Pass));
int PlayerID;
try
{
PlayerID = (int)Sql.ExecuteScalar();
}
catch (Exception x)
{
MSSQL.Close();
throw x;
}
MSSQL.Close();
return PlayerID;
Does anyone know what my SQL server is smoking?
Reply
Answers (
3
)
Treeview not expanding in MDI Child
Link Table