Events Capturing in Untyped Dataset

Discussion in 'Microsoft ADO .NET' started by Guest, Sep 7, 2005.

  1. Guest

    Guest Guest

    Hi,
    Hope somebody can help me with this.

    I have a Dataset and BindingManagerBase declared :-
    ********************************************
    Private dsData As DataSet
    Private bmData As BindingManagerBase
    ********************************************

    The dsData is fill by an oledbadapter upon the form load:-
    ******************************************
    strSQL = "SELECT * FROM tblWarehouse"
    dbAdapter.SelectCommand = New OleDbCommand(strSQL ,cn)
    dsData = New DataSet
    dbAdapter.Fill(dsData, "tblWarehouse")
    ******************************************

    Subsequently, I have my form's controls bound to the dataset:-
    *******************************************************
    txtWhseID.DataBindings.Add("Text", dsData, "tblWarehouse.strWarehouseID")
    cboWhseType.DataBindings.Add("Text", dsData, "tblWarehouse.strType")
    bmData = Me.BindingContext(dsData, "tblWarehouse")
    *******************************************************

    Currently, I can navigate the dataset by manipulate the bmData:-
    ************************************************
    bmData.Position = 0 '(Go to First Record)
    bmData.Position -= 1 '(Go to Previous Record)
    ************************************************

    Now, I would like to add in the record indicator into my Form:- Record 3 of 10

    The easiest way, is to capture the event when the dataset move from one
    record to another or when a record in the dataset is deleted or added.
    Example :
    Private Sub dsData_Move()
    ' Calculate the current record position and update result to form display
    end sub


    Anyone help ?
     
    Guest, Sep 7, 2005
    #1
    1. Advertisements

  2. Guest

    olrt Guest

    olrt, Sep 7, 2005
    #2
    1. Advertisements

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Lewis Edward Moten III

    Re: Merging untyped dataset into a typed dataset (GUID problems)

    Lewis Edward Moten III, Jul 14, 2003, in forum: Microsoft ADO .NET
    Replies:
    0
    Views:
    5,401
    Lewis Edward Moten III
    Jul 14, 2003
  2. vipin kumar

    how to use merge with a typed dataset and untyped dataset

    vipin kumar, Oct 1, 2003, in forum: Microsoft ADO .NET
    Replies:
    0
    Views:
    435
    vipin kumar
    Oct 1, 2003
  3. Nedu N
    Replies:
    2
    Views:
    338
  4. Nedu N
    Replies:
    7
    Views:
    516
    Sachi
    Dec 9, 2003
  5. HKM

    Converting Untyped Dataset To Typed Dataset

    HKM, Jan 30, 2004, in forum: Microsoft ADO .NET
    Replies:
    1
    Views:
    207
    Guest
    Jan 31, 2004
Loading...

Share This Page