Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to change this code into vb.net
Message
From
30/06/2012 14:20:22
 
 
To
30/06/2012 05:53:54
Lam Hung
Truong Nguyen Co.,Ltd
Ho Chi Minh City, Vietnam
General information
Forum:
ASP.NET
Category:
Deployments
Environment versions
Environment:
VB 8.0
Miscellaneous
Thread ID:
01547319
Message ID:
01547344
Views:
67
>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)
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform