Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to change this code into vb.net
Message
De
30/06/2012 14:20:22
 
 
À
30/06/2012 05:53:54
Lam Hung
Truong Nguyen Co.,Ltd
Ho Chi Minh City, Vietnam
Information générale
Forum:
ASP.NET
Catégorie:
Déploiements
Versions des environnements
Environment:
VB 8.0
Divers
Thread ID:
01547319
Message ID:
01547344
Vues:
68
>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)
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform