Wrong SQL Creation?
Posted: Fri 10 Jun 2011 10:39
Hey
Using your latest components (6.30.165) with VB.NET 2010
I run the following code:
Where nListInvNr has a List(Of String) declaration.
When nListInvNr does contain no elements, then the following SQL Code is created:
The FALSE Statement seems to be something mystique.
THX
Using your latest components (6.30.165) with VB.NET 2010
I run the following code:
Code: Select all
Artikel = From Query In myDataContext.Artikelstamms Where _
nListInvNr.Contains(Query.Invnr) And _
nListLieferanten.Contains(Query.Lieferant) _
Select Query
Where nListInvNr has a List(Of String) declaration.
When nListInvNr does contain no elements, then the following SQL Code is created:
Code: Select all
SELECT t1.ID, t1.geloescht, t1.InvNr, t1.Lieferant, t1.ArtikelNr, t1.Groesse, t1.Farbe, t1.ArtBez, t1.Mwst, t1.VPreis, t1.DivArt, t1.iCode, t1.oCode, t1.oepreis, t1.EPreis, t1.DatSeit, t1.DatlAenderung, t1.kommisionsware, t1.kommisionswarezurueck, t1.gueltig_von, t1.gueltig_bis, t1.Zeitstempel
FROM artikelstamm t1
WHERE FALSE AND (t1.Lieferant IN (:p0))
THX