Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Mulitple Results from Sql query

Status
Not open for further replies.

knight1001

Technical User
Nov 29, 2004
14
GB
HELP!!!

Im trying to display the multiple results returned from this query, but can't get it to return them.It can return one ,but not sure how to return them as a list.

Code:
commandpartthree = new OleDbCommand("SELECT [Full Name] FROM Mechanics WHERE [Car No] = @CarNo");
    commandpartthree.Connection = connectionpartthree;
	connectionpartthree.Open();
    commandpartthree.Parameters.Add("@CarNo", OleDbType.VarChar);
    commandpartthree.Parameters["@CarNo"].Value = CarNo.Text; 

<tr>
		<td width="40%" align="right">Please Input The Car No.</td>
		<td align="left" colspan="2"><asp:TextBox CssClass="controlText" Width="200" ID="CarNo" runat="server"/></td>
		<td width="40%" align="right">Mechanic Name</td>
		<td align="left" colspan="2"><asp:TextBox CssClass="controlText" Width="200" ID="TextFullName" runat="server"/></td>
	  <tr>
	  <td width="50%" align="left"><asp:Button CssClass="controlText" Width="60" ID="ButtonFetch" Text="Fetch" runat="server"/>
 
Maybe a Recordset ?

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244
 
i believe this is .net - and recordsets don't exist anymore, you use datasets (i believe)
 
It is asp.net , I simply want to output the results to a text box to display on screen , is there a quick and painless way to do it, and could someone possibly do an example piece of code for reference

Regards

Gaz
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top