StarScream
Technical User
Syntax Error In FROM Clause
I am trying to get this ASP to output info from a specific record. I input the name of the system "Microsoft" which correlates to a single record which has 4 people on it. Each person does a different job. The person I want is SysPersID. But this would obviously just return a number. So I want to INNER JOIN to the PersonnelTable and look up that ID to return the PersonnelName. Heres the code:
It says I have a syntax error in the FROM clause (I bolded the line). Any ideas what I'm doing to get the syntax error ? Thanks.
I am trying to get this ASP to output info from a specific record. I input the name of the system "Microsoft" which correlates to a single record which has 4 people on it. Each person does a different job. The person I want is SysPersID. But this would obviously just return a number. So I want to INNER JOIN to the PersonnelTable and look up that ID to return the PersonnelName. Heres the code:
Code:
<%
Set DataConn = Server.CreateObject("ADODB.Connection")
DataConn.Open "Driver=Microsoft Access Driver (*.mdb);DBQ=" & Server.MapPath("Database.mdb")
Set cmdTemp = Server.CreateObject("ADODB.Command")
Set rstTable = Server.CreateObject("ADODB.Recordset")
cmdTemp.CommandText = "SELECT PersonnelName FROM PersonnelTable INNERJOIN SystemTable ON PersonnelID=SysPersID WHERE SystemName='Microsoft'"
cmdTemp.CommandType = 1
Set cmdTemp.ActiveConnection = DataConn
Code:
rstTable.Open cmdTemp, , 1, 3
Code:
Response.write "Person=" & Server.URLEncode(rstTable("PersonnelName"))
rstTable.Close
Set rstTable = Nothing
DataConn.Close
Set DataConn = Nothing
%>
It says I have a syntax error in the FROM clause (I bolded the line). Any ideas what I'm doing to get the syntax error ? Thanks.