Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    Regular Coder
    Join Date
    Sep 2002
    Location
    London
    Posts
    179
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Data Shape error - a pair of eyes needed

    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 - confusing himself more and more each day

  • #2
    Regular Coder
    Join Date
    Sep 2002
    Location
    London
    Posts
    179
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Don't worry - figured it...

    ... 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
    dominicall - confusing himself more and more each day


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •