Double Inner Join Query of Access 2007 db in vb.net

I'm having a problem jumping across multiple relational tables in an access 2007 database using aspx and vb.net. Sadly I have no control over 17+ table db structure or format.

The query i'm attempting to call works correctly in access but throws the following error when run through asp and vb.net.

No value given for one or more required parameters.

Tbl_A Structure:

ID (PK)
Device_SiteID (Linked to Tbl B)
StatusID
...

Tbl_B Structure

Device_SiteID
SiteID (Linked To Tbl_C)
...

Tbl_C Structure

SiteName
SiteID
...

code

Dim path As String = System.Web.HttpContext.Current.Server.MapPath("..\abcd\db\db.accdb")
        Dim dbCon As New OleDbConnection("Provider=Microsoft.ACE.OLEDB.12.0;Data Source="+ path)
dbCon.Open()
Dim sql As String = ""
sql = "SELECT Tbl_FMOPM828.[StatusID] "
sql += "FROM Tbl_Sites "
sql += "INNER JOIN (LTbl_Device_Sites "
sql += "INNER JOIN Tbl_FMOPM828 "
sql += "ON LTbl_Device_Sites.[Device_SitesID] = Tbl_FMOPM828.[Device_SitesID]) "
sql += "ON Tbl_Sites.SitesID = LTbl_Device_Sites.SitesID "
sql += "WHERE ((Not(Tbl_FMOPM828.StatusID)=1) AND ((Tbl_Sites.SitesName)=Timbucktoo))"

Dim statusCmd As N`ew OleDbCommand(sql, dbCon)
...

Answers


try to enclose Timbucktoo in quotes = 'Timbucktoo'


Need Your Help

HTTP transport error: javax.net.ssl.SSLHandshakeException

java ssl glassfish

I have a Java Client on Glassfish that has to consume a soap web service from a third party but I can't get around the error:

Button Wont disable IOS Objective C

ios objective-c button uibutton

I'm coding a button that shoots a projectile when it is pressed. However, I