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
starazam
NA
43
0
whats bad with odbc
Jan 16 2005 3:34 PM
hi i hava a stored procedure which accepts some parameters... previousy i was working with sqlconnection in asp.net to call this storeprocedure.......every thing was working fine but now when i started to use an odbc connection, when ever i call that stored procedure it give me following error msg... Although i have provided all the parameters it recuires........code is also given below...... plz help soon Server Error in '/OnlineResume' Application. -------------------------------------------------------------------------------- ERROR [42000] [Microsoft][ODBC SQL Server Driver][SQL Server]Procedure 'login' expects parameter '@loginid', which was not supplied. Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. Exception Details: System.Data.Odbc.OdbcException: ERROR [42000] [Microsoft][ODBC SQL Server Driver][SQL Server]Procedure 'login' expects parameter '@loginid', which was not supplied. Source Error: Line 29: sqlcom.Parameters["@loginstatus"].Direction = ParameterDirection.Output;Line 30: sqlcon.Open();Line 31: sqlcom.ExecuteNonQuery();Line 32: int count=Convert.ToInt32(sqlcom.Parameters["@loginstatus"].Value);Line 33: sqlcon.Close(); Source File: f:\onlineresume\onlineresume\jps\users.cs Line: 31 Stack Trace: code to call is OdbcCommand sqlcom=new OdbcCommand("login",sqlcon); sqlcom.CommandType=CommandType.StoredProcedure; sqlcom.Parameters.Add("@loginid",OdbcType.VarChar); sqlcom.Parameters["@loginid"].Value=id; sqlcom.Parameters.Add("@password",OdbcType.VarChar); sqlcom.Parameters["@password"].Value=password; sqlcom.Parameters.Add("@loginstatus", OdbcType.Int); sqlcom.Parameters["@loginstatus"].Direction = ParameterDirection.Output; sqlcon.Open(); sqlcom.ExecuteNonQuery(); int count=Convert.ToInt32(sqlcom.Parameters["@loginstatus"].Value);
Reply
Answers (
5
)
cmd.executeNonWQuery() freezes
Outer Join among multiple Databases in C#