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

How do I use a sprite background image to display once on an element (no-repeat)?

css jquery-ui css-sprites

I wish to add a jQuery icon to another class which is added by another plugin (jquery.tablesorter.js), specifically I wish to add the icon ui-icon-triangle-1-n to the .headerSortUp class from

About UNIX Resources Network

Original, collect and organize Developers related documents, information and materials, contains jQuery, Html, CSS, MySQL, .NET, ASP.NET, SQL, objective-c, iPhone, Ruby on Rails, C, SQL Server, Ruby, Arrays, Regex, ASP.NET MVC, WPF, XML, Ajax, DataBase, and so on.