first of all, I would suggest you join a C# list that I am subscribed to [EMAIL PROTECTED] (mailto:[EMAIL PROTECTED]) , secondly, have a look at the method below that I have just written but not tested yet, use to get a return value from a stored Procedure in C# public string GetOneParameterFromSP(string 1stParam,string 2ndParam,string SPname) {
SqlConnection conConnect2SQL = new SqlConnection(strConnectionString); SqlCommand comCheckLogedIn = new SqlCommand(); comCheckLogedIn.Connection = conConnect2SQL; comCheckLogedIn.CommandType = CommandType.StoredProcedure; comCheckLogedIn.CommandText = SPname; comCheckLogedIn.Parameters.Add(1stParam, SqlDbType.VarChar, 30); comCheckLogedIn.Parameters[1stParam].Direction = ParameterDirection.Input; comCheckLogedIn.Parameters[1stParam].Value=strMachinename; comCheckLogedIn.Parameters.Add(2ndParam, SqlDbType.VarChar, 30); comCheckLogedIn.Parameters[2ndParam].Direction = ParameterDirection.Input; comCheckLogedIn.Parameters[2ndParam].Value=strUserName; string outParam = "@outUserID"; comCheckLogedIn.Parameters.Add(outParam, SqlDbType.VarChar, 30); comCheckLogedIn.Parameters["@outUserID"].Direction = ParameterDirection.Output; this.connectSQLServer.Open(); outUserID = comCheckLogedIn.Parameters["@outUserID"].Value; return outUserID; } [Non-text portions of this message have been removed] ------------------------ Yahoo! Groups Sponsor ---------------------~--> Buy Ink Cartridges or Refill Kits for your HP, Epson, Canon or Lexmark Printer at MyInks.com. Free s/h on orders $50 or more to the US & Canada. http://www.c1tracking.com/l.asp?cid=5511 http://us.click.yahoo.com/mOAaAA/3exGAA/qnsNAA/saFolB/TM ---------------------------------------------------------------------~-> Yahoo! Groups Links <*> To visit your group on the web, go to: http://groups.yahoo.com/group/AspNetAnyQuestionIsOk/ <*> To unsubscribe from this group, send an email to: [EMAIL PROTECTED] <*> Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/
