'/' 應用程式中發生伺服器錯誤。

SQL logic error or missing database
near ")": syntax error

SELECT
           GeneralContentNo ,
           GeneralContentCategoryNo ,
           --PicturePath as ItemPicturePath ,
           --FirstBigPicturePath as FirstBigPicturePath ,
           FirstBigPicturePath as ItemPicturePath ,
           FirstSmallPicturePath as SmallPicturePath ,
           ContentTitle as ItemName ,
            ('/Util/GotoGeneralContent.aspx?GeneralContentNo=' || GeneralContentNo ) as ItemUrl ,
           Target as Target ,
           strftime('%Y/%m/%d', CreateTime) as CreateTime ,
           GeneralContentNo  as ItemDescription ,
           ShortDescription as ItemShortDescription ,
           

           Attribute1Code  ,
           Attribute1Value ,

           Attribute2Code  ,
           Attribute2Value ,

           Attribute3Code  ,
           Attribute3Value ,

           Attribute4Code  ,
           Attribute4Value ,

           Attribute5Code  ,
           Attribute5Value ,

           Attribute6Code  ,
           Attribute6Value ,

           Attribute7Code  ,
           Attribute7Value ,

           Attribute8Code  ,
           Attribute8Value ,

           Attribute9Code  ,
           Attribute9Value ,

           Attribute10Code  ,
           Attribute10Value ,

           Attribute11Code  ,
           Attribute11Value ,

           Attribute12Code  ,
           Attribute12Value ,

           Attribute13Code  ,
           Attribute13Value ,

           Attribute14Code  ,
           Attribute14Value ,

           Attribute15Code  ,
           Attribute15Value ,

           Attribute16Code  ,
           Attribute16Value ,

           Attribute17Code  ,
           Attribute17Value ,

           Attribute18Code  ,
           Attribute18Value ,

           Attribute19Code  ,
           Attribute19Value ,

           Attribute20Code  ,
           Attribute20Value ,

           (SELECT ItemFloatingContent FROM ContentDisplay WHERE ContentDisplayNo = 7 AND DataLanguage = 'ZH_TW' Limit 0 , 1 ) as ItemFloatingContent
FROM
               [GeneralContentView]
           WHERE
               1 = 1                
               AND DataLanguage = 'ZH_TW' AND TagName = 'CustomContent'
               AND
               (
 (SELECT PageTitle FROM GeneralContentCategory
WHERE
  GeneralContentView.GeneralContentCategoryNo = GeneralContentCategory.GeneralContentCategoryNo  
Limit 0 , 1
) =
                  )
                AND
   (Expired <> 1)
   AND
(
   (ValidateStartTime is NULL AND ValidateStartTime is NULL)
   OR
   (
       (
           ( ValidateStartTime is NULL )
           OR
           ( ValidateStartTime <= datetime('now','localtime') )
       )
       AND
       (
           ( ValidateEndTime IS NULL )
           OR
           ( datetime('now','localtime') <= ValidateEndTime )
       )
   )
)
AND (
  GeneralContentCategoryNo=120 OR
  GeneralContentCategoryNo=121 OR
  GeneralContentCategoryNo=122 OR
  GeneralContentCategoryNo=123 OR
  GeneralContentCategoryNo=119
)

               AND
               (
                   Expired <> 1
                   AND
                   (
                       (ValidateStartTime is NULL AND ValidateStartTime is NULL)
                       OR
                       (
                           (
                               ( ValidateStartTime is NULL )
                               OR
                               ( ValidateStartTime <= datetime('now','localtime') )
                           )
                           AND
                           (
                               ( ValidateEndTime IS NULL )
                               OR
                               ( datetime('now','localtime') <= ValidateEndTime )
                           )
                       )
                   )
               )
ORDER BY SequenceNo , CreateTime Desc
Limit 0 , 1000
      

描述: 在執行目前 Web 要求的過程中發生未處理的例外狀況。請檢閱堆疊追蹤以取得錯誤的詳細資訊,以及在程式碼中產生的位置。

例外狀況詳細資訊: System.Exception: SQL logic error or missing database
near ")": syntax error

SELECT
           GeneralContentNo ,
           GeneralContentCategoryNo ,
           --PicturePath as ItemPicturePath ,
           --FirstBigPicturePath as FirstBigPicturePath ,
           FirstBigPicturePath as ItemPicturePath ,
           FirstSmallPicturePath as SmallPicturePath ,
           ContentTitle as ItemName ,
            ('/Util/GotoGeneralContent.aspx?GeneralContentNo=' || GeneralContentNo ) as ItemUrl ,
           Target as Target ,
           strftime('%Y/%m/%d', CreateTime) as CreateTime ,
           GeneralContentNo  as ItemDescription ,
           ShortDescription as ItemShortDescription ,
           

           Attribute1Code  ,
           Attribute1Value ,

           Attribute2Code  ,
           Attribute2Value ,

           Attribute3Code  ,
           Attribute3Value ,

           Attribute4Code  ,
           Attribute4Value ,

           Attribute5Code  ,
           Attribute5Value ,

           Attribute6Code  ,
           Attribute6Value ,

           Attribute7Code  ,
           Attribute7Value ,

           Attribute8Code  ,
           Attribute8Value ,

           Attribute9Code  ,
           Attribute9Value ,

           Attribute10Code  ,
           Attribute10Value ,

           Attribute11Code  ,
           Attribute11Value ,

           Attribute12Code  ,
           Attribute12Value ,

           Attribute13Code  ,
           Attribute13Value ,

           Attribute14Code  ,
           Attribute14Value ,

           Attribute15Code  ,
           Attribute15Value ,

           Attribute16Code  ,
           Attribute16Value ,

           Attribute17Code  ,
           Attribute17Value ,

           Attribute18Code  ,
           Attribute18Value ,

           Attribute19Code  ,
           Attribute19Value ,

           Attribute20Code  ,
           Attribute20Value ,

           (SELECT ItemFloatingContent FROM ContentDisplay WHERE ContentDisplayNo = 7 AND DataLanguage = 'ZH_TW' Limit 0 , 1 ) as ItemFloatingContent
FROM
               [GeneralContentView]
           WHERE
               1 = 1                
               AND DataLanguage = 'ZH_TW' AND TagName = 'CustomContent'
               AND
               (
 (SELECT PageTitle FROM GeneralContentCategory
WHERE
  GeneralContentView.GeneralContentCategoryNo = GeneralContentCategory.GeneralContentCategoryNo  
Limit 0 , 1
) =
                  )
                AND
   (Expired <> 1)
   AND
(
   (ValidateStartTime is NULL AND ValidateStartTime is NULL)
   OR
   (
       (
           ( ValidateStartTime is NULL )
           OR
           ( ValidateStartTime <= datetime('now','localtime') )
       )
       AND
       (
           ( ValidateEndTime IS NULL )
           OR
           ( datetime('now','localtime') <= ValidateEndTime )
       )
   )
)
AND (
  GeneralContentCategoryNo=120 OR
  GeneralContentCategoryNo=121 OR
  GeneralContentCategoryNo=122 OR
  GeneralContentCategoryNo=123 OR
  GeneralContentCategoryNo=119
)

               AND
               (
                   Expired <> 1
                   AND
                   (
                       (ValidateStartTime is NULL AND ValidateStartTime is NULL)
                       OR
                       (
                           (
                               ( ValidateStartTime is NULL )
                               OR
                               ( ValidateStartTime <= datetime('now','localtime') )
                           )
                           AND
                           (
                               ( ValidateEndTime IS NULL )
                               OR
                               ( datetime('now','localtime') <= ValidateEndTime )
                           )
                       )
                   )
               )
ORDER BY SequenceNo , CreateTime Desc
Limit 0 , 1000
      

原始程式錯誤:

只有在偵錯模式編譯時,才可以顯示產生此未處理例外狀況的原始程式碼。若要啟動,請依照下列步驟之一,然後要求 URL:

1. 將 "Debug=true" 指示詞加入產生錯誤的程式碼頂端。例如:

  <%@ Page Language="C#" Debug="true" %>

或:

2. 將下列區段加入您應用程式的組態檔:

<configuration>
   <system.web>
       <compilation debug="true"/>
   </system.web>
</configuration>

請注意: 第二種技巧會導致在偵錯模式下編譯指定應用程式中的所有檔案。第一種技巧只會造成在偵錯模式下編譯該特定檔案。

重要資訊: 在偵錯模式下執行應用程式會過度耗用記憶體/效能。在實際執行部署之前,應該先確認應用程式已經停止偵錯。

堆疊追蹤:


[Exception: SQL logic error or missing database
near ")": syntax error

SELECT
            GeneralContentNo ,
            GeneralContentCategoryNo ,
            --PicturePath as ItemPicturePath , 
            --FirstBigPicturePath as FirstBigPicturePath , 
            FirstBigPicturePath as ItemPicturePath , 
            FirstSmallPicturePath as SmallPicturePath ,
            ContentTitle as ItemName ,
             ('/Util/GotoGeneralContent.aspx?GeneralContentNo=' || GeneralContentNo ) as ItemUrl ,
            Target as Target ,
            strftime('%Y/%m/%d', CreateTime) as CreateTime ,
            GeneralContentNo  as ItemDescription ,
            ShortDescription as ItemShortDescription ,
            

            Attribute1Code  , 
            Attribute1Value ,

            Attribute2Code  , 
            Attribute2Value ,

            Attribute3Code  , 
            Attribute3Value ,

            Attribute4Code  , 
            Attribute4Value ,

            Attribute5Code  , 
            Attribute5Value ,

            Attribute6Code  , 
            Attribute6Value ,

            Attribute7Code  , 
            Attribute7Value ,

            Attribute8Code  , 
            Attribute8Value ,

            Attribute9Code  , 
            Attribute9Value ,

            Attribute10Code  , 
            Attribute10Value ,

            Attribute11Code  , 
            Attribute11Value ,

            Attribute12Code  , 
            Attribute12Value ,

            Attribute13Code  , 
            Attribute13Value ,

            Attribute14Code  , 
            Attribute14Value ,

            Attribute15Code  , 
            Attribute15Value ,

            Attribute16Code  , 
            Attribute16Value ,

            Attribute17Code  , 
            Attribute17Value ,

            Attribute18Code  , 
            Attribute18Value ,

            Attribute19Code  , 
            Attribute19Value ,

            Attribute20Code  , 
            Attribute20Value ,

            (SELECT ItemFloatingContent FROM ContentDisplay WHERE ContentDisplayNo = 7 AND DataLanguage = 'ZH_TW' Limit 0 , 1 ) as ItemFloatingContent
FROM
                [GeneralContentView]
            WHERE
                1 = 1                
                AND DataLanguage = 'ZH_TW' AND TagName = 'CustomContent'
                AND 
                ( 
  (SELECT PageTitle FROM GeneralContentCategory 
WHERE
   GeneralContentView.GeneralContentCategoryNo = GeneralContentCategory.GeneralContentCategoryNo  
 Limit 0 , 1
) = 
                   )
                 AND 
    (Expired <> 1) 
    AND 
(
    (ValidateStartTime is NULL AND ValidateStartTime is NULL) 
    OR
    (
        (
            ( ValidateStartTime is NULL )
            OR
            ( ValidateStartTime <= datetime('now','localtime') )
        )
        AND
        (
            ( ValidateEndTime IS NULL )
            OR
            ( datetime('now','localtime') <= ValidateEndTime )
        ) 
    )
)
 AND (
   GeneralContentCategoryNo=120 OR 
   GeneralContentCategoryNo=121 OR 
   GeneralContentCategoryNo=122 OR 
   GeneralContentCategoryNo=123 OR 
   GeneralContentCategoryNo=119
)

                AND 
                (
                    Expired <> 1
                    AND 
                    (
                        (ValidateStartTime is NULL AND ValidateStartTime is NULL) 
                        OR
                        (
                            (
                                ( ValidateStartTime is NULL )
                                OR
                                ( ValidateStartTime <= datetime('now','localtime') )
                            )
                            AND
                            (
                                ( ValidateEndTime IS NULL )
                                OR
                                ( datetime('now','localtime') <= ValidateEndTime )
                            ) 
                        )
                    )
                )
ORDER BY SequenceNo , CreateTime Desc
Limit 0 , 1000
       ]
   B2B.DBO.DBOCommon.ExecuteSql(String sql) +290
   Common.GenerateContentDisplayHtml(ContentDisplay_Bean contentDisplayBean, ParameterInfoCollection parameters, IUserControlManager userContorlManager, Int32 seedNo, List`1 contentDisplayNos, Page page, String dataLanguage) +838
   Common.GenerateContentDisplayHtml(Int32 contentDisplayNo, ParameterInfoCollection parameters, IUserControlManager userContorlManager, Int32 seedNo, List`1 contentDisplayNos, Page page) +82
   Common.ProcessContentDisplayVariable(String contentHtml, ParameterInfoCollection _parameters, IUserControlManager userContorlManager, List`1 contentDisplayNos, Page page, Boolean useImageDataSrc) +893
   Common.ProcessContentDisplayVariable(String contentHtml, IUserControlManager userContorlManager, List`1 contentDisplayNos, Page page, Boolean useImageDataSrc) +111
   Common.ProcessResizableElement(String contentHtml, IUserControlManager userContorlManager, Page page, Boolean useImageDataSrc) +67
   GeneralContentList.BindSearchData() +9176
   GeneralContentList.PreparePageData() +1585
   GeneralContentList.ProcessPageData(PageData& pageData) +369
   GeneralContentList.Page_Load(Object sender, EventArgs e) +46
   System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e) +51
   System.Web.UI.Control.OnLoad(EventArgs e) +95
   System.Web.UI.Control.LoadRecursive() +59
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +678


版本資訊: Microsoft .NET Framework 版本:4.0.30319; ASP.NET 版本:4.7.3190.0