Here is a sample using ADO.NET's executescalar, its written in C# but shouldnt be hard to translate (but I'll leave that up to you
)SqlCommand sqlCmdGetNodeParent = new SqlCommand("dba0082.sprGetNodeParent", sqlConn); sqlCmdGetNodeParent.CommandType = CommandType.StoredProcedure; SqlParameter parNodeID = sqlCmdGetNodeParent.Parameters.Add("@NodeID", SqlDbType.Int, 4); parNodeID.Value = intNodeID; intParentNode = Convert.ToInt32(sqlCmdGetNodeParent.ExecuteScalar()); foo.Text = intParentNode.ToString(); sqlCmdGetNodeParent.Dispose(); You could also accomplish what you need with ADO.NET's ExecuteNonQuery method for a SqlCommand object. There are alot of tutorials and examples at www.dotnetjunkies.comI'd also try googling for "ado.net return value"hth,Justin"Take care of yourself and do night fight with pygmies" - RT