Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

SQL Query Problem

Status
Not open for further replies.

Joelo

MIS
Sep 27, 2003
61
Please Could anyone Help me .....I don't seem to know what I am doing wrong

I keep getting the following error

Microsoft JET Database Engine error '80040e14'

Syntax error (missing operator) in query expression '[bsldatabase].DEVICEID = F:\wwwdata\maintenance\compliance\dbtemp\Databasetemp.mdb.bsldatabase.[DEVICEID]'.

/maintenance/compliance/bsldatabasenottestedlist.asp, line 157


Here is My Query
----------------



strsql = "SELECT * FROM [bsldatabase] LEFT JOIN "& server.mappath("dbtemp\Databasetemp.mdb") & ".bsldatabase ON [bsldatabase].DEVICEID = "& server.mappath("dbtemp\Databasetemp.mdb") & ".bsldatabase.[DEVICEID] WHERE "& server.mappath("dbtemp\Databasetemp.mdb") & ".bsldatabase.[DEVICEID] IS NULL"
 
Can you response.write out the sqlstr and show what it says.



Bastien

Any one have a techie job in Toronto, I need to work...being laid off sucks!
 
I have tried it and I am still getting same error message
 
This is what it says

SELECT * FROM [bsldatabase] LEFT JOIN F:\ ON [bsldatabase].DEVICEID = F:\wwwdata\maintenance\compliance\dbtemp\Databasetemp.mdb.bsldatabase.[DEVICEID] WHERE F:\wwwdata\maintenance\compliance\dbtemp\Databasetemp.mdb.bsldatabase.[DEVICEID] IS 'NULL' AND facility='Dehydration'
Microsoft JET Database Engine error '80040e14'

Syntax error (missing operator) in query expression '[bsldatabase].DEVICEID = F:\wwwdata\maintenance\compliance\dbtemp\Databasetemp.mdb.bsldatabase.[DEVICEID]'.

/maintenance/compliance/bsldatabasenottestedlist.asp, line 171
 
In both the lower parts of the query (where it shows .[DEVICEID]) its reading the DeviceID as the database and not the field. Also not sure if access can support linked databases for queries.

One trick here might be to create the link in access to see if you can do the link thru the query functions directly in access. Then copy the sql to the asp project

Bastien

Any one have a techie job in Toronto, I need to work...being laid off sucks!
 
I re-wrote the query again and now I am getting the Following error

Microsoft VBScript compilation error '800a0401'

Expected end of statement

/maintenance/compliance/bsldatabasenottestedlist.asp, line 148

strsql = "SELECT * FROM [bsldatabase] IN ("& server.mappath("db\Database.mdb") AS A LEFT JOIN [bsldatabase].DEVICEID AS B ON [bsldatabase].DEVICEID IN ("& server.mappath("db\Database.mdb") & ") = [bsldatabase].DEVICEID WHERE [bsldatabase].DEVICEID IS NULL"
-------------------------------------------------------------------------------^

Any help will do thanks


This is my Query
-------------------
strsql = "SELECT * FROM [bsldatabase] IN ("& server.mappath("db\Database.mdb") LEFT JOIN [bsldatabase].DEVICEID ON [bsldatabase].DEVICEID IN ("& server.mappath("db\Database.mdb") & ") = [bsldatabase].DEVICEID WHERE [bsldatabase].DEVICEID IS NULL"
 
missing concatinate char in the first line
strsql = "SELECT * FROM [bsldatabase] IN ("& server.mappath("db\Database.mdb")&") AS A LEFT JOIN

_____________________________________________________________________
onpnt2.gif

Hakuna matata!!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top