Dataset

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

HI
my issue is that i'm having a dataset with 2 tables in it, the problem that
i want to have a dataview wich represents a subquery ie (select * from tbl1
where id in (select top 10 from tbl2))

any ideas around
 
thanks to ken and cor :

but a relation won't help because you can't get such the following

select * from tbl1 where id not in ( select id from tbl2 )
 
Hi,

Your welcome. The only other option is to get the data when the
user changes to another record. Use the currencymanager's postionchanged
event to know when the user navigated to another record. From what i can
see you might be better off querying the database to get the records instead
of filtering records from a dataview.

General Declarations
Dim WithEvents cm As CurrencyManager

After you bind the grid.

cm = CType(Me.BindingContext(DataGrid1.DataSource), CurrencyManager)



Private Sub cm_PositionChanged(ByVal sender As Object, ByVal e As
System.EventArgs) Handles cm.PositionChanged

Me.Text = cm.Position

End Sub

Ken

---------------------

thanks to ken and cor :

but a relation won't help because you can't get such the following

select * from tbl1 where id not in ( select id from tbl2 )
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top