When I executes this query, I get this error, and I really don't know why. And I can't test the query result on the query analyser of Sql Server tools. Can anybody could me help figure out what could be my problem.
This error is showing when I try to open the connection
Run-Time error '-2147217900(80040e14)
Syntax error or access violation
Here's the query
sSql2 = "SHAPE {SELECT Description, committeeID FROM tabLstCommittee} " & _
"AS comCommittee APPEND ({SELECT tabPeopleOther.strFname & ' ' & " & _
"tabPeopleOther.strLname AS strFname, tabPeopleOther.lngPhone, " & _
"tabPeopleOther.lngBusPhone, tabPeopleOther.strEmail, tabCommittees.CommitID, " & _
"tabCommittees.strPosition, tabCommittees.bRemoved FROM tabCommittees, " & _
"tabPeopleOther WHERE tabCommittees.MemberID = tabPeopleOther.PersonID AND " & _
"tabCommittees.bRemoved = 0} AS comMembers RELATE 'Description' TO 'CommitID') " & _
"AS comMembers"
objrs.Open sSql2, strDSN, adOpenStatic, adLockReadOnly
Thx
This error is showing when I try to open the connection
Run-Time error '-2147217900(80040e14)
Syntax error or access violation
Here's the query
sSql2 = "SHAPE {SELECT Description, committeeID FROM tabLstCommittee} " & _
"AS comCommittee APPEND ({SELECT tabPeopleOther.strFname & ' ' & " & _
"tabPeopleOther.strLname AS strFname, tabPeopleOther.lngPhone, " & _
"tabPeopleOther.lngBusPhone, tabPeopleOther.strEmail, tabCommittees.CommitID, " & _
"tabCommittees.strPosition, tabCommittees.bRemoved FROM tabCommittees, " & _
"tabPeopleOther WHERE tabCommittees.MemberID = tabPeopleOther.PersonID AND " & _
"tabCommittees.bRemoved = 0} AS comMembers RELATE 'Description' TO 'CommitID') " & _
"AS comMembers"
objrs.Open sSql2, strDSN, adOpenStatic, adLockReadOnly
Thx