非非非非 2天前
datatable().select报错

报错信息:

2021-06-11 15:27:15,448 [1] ERROR  - FLIGHT_DATE:FLIGHT_DATE = DATE'2021-04-01' and FLIGHT_CODE='CF9019' and DEPARTURE_AIRPORT='ZGGG' and ARRIVAL_AIRPORT='ZBAD' AND AIRCRAFT_CODE='B2135'
********************************************
2021-06-11 15:27:15,448 [1] ERROR  - 错误
System.Data.SyntaxErrorException: Syntax error: Missing operand after ''2021-04-01'' operator.
   at Aero.Airp.Client.frmAcarsParseView.barButtonItem2_ItemClick(Object sender, ItemClickEventArgs e)
   at DevExpress.XtraBars.BarItem.OnClick(BarItemLink link)
   at DevExpress.XtraBars.BarBaseButtonItem.OnClick(BarItemLink link)
   at DevExpress.XtraBars.BarItemLink.OnLinkClick()
   at DevExpress.XtraBars.BarItemLink.OnLinkAction(BarLinkAction action, Object actionArgs)
   at DevExpress.XtraBars.BarButtonItemLink.OnLinkAction(BarLinkAction action, Object actionArgs)
   at DevExpress.XtraBars.BarItemLink.OnLinkActionCore(BarLinkAction action, Object actionArgs)
   at DevExpress.XtraBars.ViewInfo.BarSelectionInfo.ClickLink(BarItemLink link)
   at DevExpress.XtraBars.ViewInfo.BarSelectionInfo.UnPressLink(BarItemLink link)
   at DevExpress.XtraBars.Controls.CustomLinksControl.OnMouseUp(MouseEventArgs e)
   at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
   at System.Windows.Forms.Control.WndProc(Message& m)
   at DevExpress.XtraBars.Controls.DockedBarControl.WndProc(Message& msg)
   at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
   at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
   at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

 

 

代码信息:

 

  DataRow[] Rows = ds.Tables[0].Select(string.Format("FLIGHT_DATE = DATE'2021-04-01' and FLIGHT_CODE='CF9019' and DEPARTURE_AIRPORT='ZGGG' and ARRIVAL_AIRPORT='ZBAD' AND AIRCRAFT_CODE='B2135'"));
                           

...全文
281 点赞 收藏 1
写回复
1 条回复

还没有回复,快来抢沙发~

发动态
发帖子
C#
创建于2007-09-28

8.4w+

社区成员

64.0w+

社区内容

.NET技术 C#
社区公告
暂无公告