I am joining two tables together using INNER join. I want some of the feilds from one table (stockLevels) and some fields from the other (productFile).

When select all fields it works fine:

SELECT * FROM stockLevels INNER JOIN productFile ON productFile.ProductID = stockLevels.productID;


but when I start to choose the fields Even one I get an error.


Dim sqlQuery2 As String = "select stoclLevels.name, productFile.costPrice from stockLevels INNER JOIN productFile ON productFile.ProductID = stockLevels.productID"



No value givern fore one or more paramiters.


The SQL command I would like to execute is:


Dim sqlQuery2 As String = "SELECT productFile.supplierID, productFile.productID, productFile.ProdctName, productFile.costPrice, productFile.servingsPerUnit, stockLvels.servings, stockLevels.reorderLevel, stockLevels.NormaLevel FROM productFile INNER JOIN stockLevels ON productFile.ProductID = stockLevels.productID ;"



Thanks for reading an please help

scottie.uk