Hi all!<BR>could anyone please point me to an article or supply some code to do a simple select from SQL Server, but all I want is a single value (I know only one result will return from my SELECT as I will filter it). All I can find is examples of how to 'bind' data to DataGrids or other controls, I just want this value on it's own, as it will be used as a variable, and displayed elsewhere etc. I know how simple this must be, but I can't find an example anywhere of how to do it. I understand I may still have to bind to the page itself, this is fine, but how do I display it?<BR><BR>Thanks in advance<BR><BR>Neil BEssentially what you need to do is create a DataReader (i.e., an OleDbDataReader or SqlClientDataReader, or whatever) and then populate it. If you are expecting back a row or rows, use ExecuteReader() else, if you are expecting a single, scalar value back, use ExecuteScalar() method.<BR><BR>I'd encourage you to look into the MS docs on this. If you have the help installed, browse to:<BR>ms-help://MS.VSCC/MS.MSDNVS/cpref/html/frlrfSystemDataOleDbOleDbDataReaderClassTopic.htm<BR><BR>There are some examples there. hthHi Neil,<BR><BR>U can write a Stored Procedure in SQL Server. This proc will return the name where u give ur EmployeeID(For example)<BR><BR>CREATE PROCEDURE ProcName_sp<BR>(<BR>@EmpID as int<BR>@Name as varchar(50) OUT<BR>)<BR>Select @Name=EmpName from Employee where EmpID=@EmpID<BR><BR><BR>From ur Front End u can call StoredProcedure as <BR><BR>Dim Name as String<BR>Set conn as SQLConnection= New SQLConnection(ConnString) <BR>Set cmd as SQLCommand = New SQLCommand("ProcName_sp",conn)<BR>cmd.CommandType=CommandType.StoredProcedure<BR><BR>Dim prmEmpID as New SQLParameter("@EmpID", SQLDbType.Int)<BR>prmEmpID.Value = http://aspmessageboard.com/archive/index.php/100<BR>Cmd.Parameters.Add(prmEmpID)<BR><BR>Set prmEmpName = New Parameters("@Name", SQLDbType.Varchar, 50)<BR>prmEmpName.Direction = ParameterDirection.Output<BR>Cmd.Parameters.Add(prmEmpName)<BR><BR>Conn.Open()<BR>cmd.ExecuteNonQuery()<BR><BR>Name = Cmd.Parameters("@Name").Value<BR><BR>So the value which u want to retrieve will be in the variable 'Name'.<BR><BR>I'm sure this will slove ur problem ...<BR><BR>Krishnan.<BR><BR><BR><BR><BR>Thanks for these suggestions, I have a few ways to achieve this now. I was also trying to use <%# %>(delimiters with hash) if possible, does anyone have an example of this being used with a datareader object or something similar?<BR>much appreciated<BR>Neil