>Hi all:
> Could you please show me, how to convert this code :
> select ItemCode,ItemName,Unit from tb_ItemList where Itemcode not in (select Itemcode from SubList)
>
>In Visual Foxpro, it is extremely easy to do it, but in VB.NET I don't know how to convert this code into VB.NET because datatable
>in VB.NET doses not support to run SQL Expression like Foxpro
>
>Thank you very much.
Not sure what you are asking. The command is SQL specific - not VB.NET and should work. Given, for example, something like this (which assumes a SQL connection) then where does your problem lie:
Dim conn As New SqlConnection()
conn.ConnectionString = "The connection string"
conn.Open()
Dim text As String = "SELECT ItemCode,ItemName,Unit FROM tb_ItemList WHERE Itemcode NOT IN (SELECT Itemcode FROM SubList)"
Dim adapter As New SqlDataAdapter(text, conn)
Dim table As New DataTable()
adapter.Fill(table)