...

View Full Version : Data Shape error - a pair of eyes needed



dominicall
02-25-2003, 03:36 PM
Hey all

Any data shaping experts out there???

Have a data shaping select statement that's returning the following error...

MSDataShape error '80040e14'

Data shape command text contains a syntax error at or near position 848 in the command. The text near the error is: " RELATE tbl_NewsCats.NewsCatID = tbl_Articles.NewsCatID)".

/admin/includes/news/list.asp, line 42

Data shaping statement is below... have spent ages looking at it and can't see the error - is driving me mad - so wondered if anyone could see it...

strDataShape = "SHAPE {SELECT * FROM tbl_NewsCats} " &_
"APPEND ({SELECT tbl_Articles.NewsID AS NewsID, tbl_NewsCats.CatDesc AS NewsCat, tbl_Articles.NewsName AS NewsName, tbl_Articles.Summary AS Summary, " &_
"tbl_Articles.StartDate AS StartDate, tbl_Articles.EndDate AS EndDate, tbl_Admins.Firstname AS Firstname, tbl_Admins.Surname AS Surname, " &_
"tbl_Hotels.HotelName AS HotelName, tbl_LookupPublishFlag.PublishFlagDesc AS PublishFlag " &_
"FROM tbl_Hotels " &_
"INNER JOIN tbl_Admins ON tbl_Hotels.HotelID = tbl_Admins.HotelID RIGHT OUTER JOIN " &_
"tbl_Articles ON tbl_Admins.AdminID = tbl_Articles.CreatedBy LEFT OUTER JOIN "&_
"tbl_NewsCats ON tbl_Articles.NewsCatID = tbl_NewsCats.NewsCatID LEFT OUTER JOIN "&_
"tbl_LookupPublishFlag ON tbl_Articles.Publish = tbl_LookupPublishFlag.PublishFlagID "&_
"WHERE tbl_Admins.HotelID = " & HotelID & " " &_
"ORDER BY tbl_Articles.CreatedDate DESC} AS rsArticles " &_
"RELATE tbl_NewsCats.NewsCatID = tbl_Articles.NewsCatID)"

Thanks

dominicall

dominicall
02-25-2003, 05:25 PM
... or should I say someone who writes about these things professionally saw it straight away - how embarrasing - LOL

For anyone who's interested, the problem was in the RELATE statement - I used = when I should have used TO.

dominicall



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum