HELP PLEASE!!

[b][red]This message was edited by ldn769 at 2005-7-25 17:59:37[/red][/b][hr]
I am supposed to
"allow the user to select a customer from a DataGrid, and display the number of orders the customer has placed. Please use the following SQL statement to create your second (child) Data Adapter.

SELECT
COUNT(customerid) AS OrderCount,
CustomerID
FROM
Orders
GROUP BY
CustomerID"

But I cannot seem to figure out how to get my textbox to display the ordercount number. please help!

Thanks!
Lindsay


Comments

  • We don't do homework here.
    Anyway the TextBox have a property Text which is the value that is displayed in the TextBox. If you use Data control, it have a property Recordset, which have Fields collection. If you use ADO, any query that returns value generates also a Recordset object.

    You can use Text1.Text = MyRecordset.Fields("FieldName") to get the value from db.

    : I am supposed to
    : "allow the user to select a customer from a DataGrid, and display the number of orders the customer has placed. Please use the following SQL statement to create your second (child) Data Adapter.
    :
    : SELECT
    : COUNT(customerid) AS OrderCount,
    : CustomerID
    : FROM
    : Orders
    : GROUP BY
    : CustomerID"
    :
    : But I cannot seem to figure out how to get my textbox to display the ordercount number. please help!
    :
    : Thanks!
    : Lindsay
    :
    :
    :

Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

In this Discussion