Howdy, Stranger!

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

Categories

adodc & datagrid

i am using adodc and datagrid control
i set adodc properties and also bind the datagrid with adodc at design time
it works fine
but i like to change the query at run time like if i want to use order by name or city or batch year, any field it could be

how it is possible at run time

Thanks

Comments

  • dokken2dokken2 Member Posts: 532
    : i am using adodc and datagrid control
    : i set adodc properties and also bind the datagrid with adodc at
    : design time
    : it works fine
    : but i like to change the query at run time like if i want to use
    : order by name or city or batch year, any field it could be
    :
    : how it is possible at run time
    :
    : Thanks
    :
    update the recordsource property and refresh the connection-

    Me.Adodc1.RecordSource = "select * from table1 where ([field1]='2')"
    Me.Adodc1.Refresh
  • himanshoohimanshoo Member Posts: 6
    It works
    Thanks

    : : i am using adodc and datagrid control
    : : i set adodc properties and also bind the datagrid with adodc at
    : : design time
    : : it works fine
    : : but i like to change the query at run time like if i want to use
    : : order by name or city or batch year, any field it could be
    : :
    : : how it is possible at run time
    : :
    : : Thanks
    : :
    : update the recordsource property and refresh the connection-
    :
    : Me.Adodc1.RecordSource = "select * from table1 where ([field1]='2')"
    : Me.Adodc1.Refresh
    :

Sign In or Register to comment.