Hi,
I get this error
Server Error in '/App18_devst' Application.
Syntax error (missing operator) in query expression 'iif(isnull([feat8_dt]),''
,format([f
eat8_dt],'
dd-mm-yyyy
') [feat8_dt],[feat7],[feat9]
,[feat10],
[obj4_full
name],[obj
4_name],[f
eat11],[fe
at12],[fea
t13_dt] as [col_feat13_dt], [feat14_dt] as [col_feat14_dt] FROM [ite_tab] where [ite_abbr]=@par_id'.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.Data.OleDb.OleDbExc
eption: Syntax error (missing operator) in query expression 'iif(isnull([feat8_dt]),''
,format([f
eat8_dt],'
dd-mm-yyyy
') [feat8_dt],[feat7],[feat9]
,[feat10],
[obj4_full
name],[obj
4_name],[f
eat11],[fe
at12],[fea
t13_dt] as [col_feat13_dt], [feat14_dt] as [col_feat14_dt] FROM [ite_tab] where [ite_abbr]=@par_id'.
Source Error:
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
Stack Trace:
[OleDbException (0x80040e14): Syntax error (missing operator) in query expression 'iif(isnull([feat8_dt]),''
,format([f
eat8_dt],'
dd-mm-yyyy
') [feat8_dt],[feat7],[feat9]
,[feat10],
[obj4_full
name],[obj
4_name],[f
eat11],[fe
at12],[fea
t13_dt] as [col_feat13_dt], [feat14_dt] as [col_feat14_dt] FROM [ite_tab] where [ite_abbr]=@par_id'.]
System.Data.OleDb.OleDbCom
mand.Execu
teCommandT
extErrorHa
ndling(Ole
DbHResult hr) +1844461
System.Data.OleDb.OleDbCom
mand.Execu
teCommandT
extForSing
leResult(t
agDBPARAMS
dbParams, Object& executeResult) +398
System.Data.OleDb.OleDbCom
mand.Execu
teCommandT
ext(Object
& executeResult) +243
System.Data.OleDb.OleDbCom
mand.Execu
teReaderIn
ternal(Com
mandBehavi
or behavior, String method) +280
System.Data.OleDb.OleDbCom
mand.Execu
teReader(C
ommandBeha
vior behavior) +264
App18._Default.refresh_pg(
) +4475
App18._Default.Pfeat9_Load
(Object sender, EventArgs e) +724
System.Web.UI.Control.Load
Recursive(
) +71
System.Web.UI.Pfeat9.Proce
ssRequestM
ain(Boolea
n includeStfeat9sBeforeAsync
Point, Boolean includeStfeat9sAfterAsyncP
oint) +3178
Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.18408
due to this line. why?
OleDbCommand cmd = new OleDbCommand("SELECT top 1 [ite_id],[ite_abbr],[ite_name],[ite_feat],[obj2_id],[obj3_id],[ent_id],[ent_feat2_id],[ent_title_id],[feat3],[feat4],[feat5],[feat6],[feat7],iif(isnull([feat8_dt]),'',format([feat8_dt],'dd-mm-yyyy') [feat8_dt],[feat7],[feat9],[feat10],[obj4_fullname],[obj4_name],[feat11],[feat12],[feat13_dt] as [col_feat13_dt], [feat14_dt] as [col_feat14_dt] FROM [ite_tab] where [ite_abbr]=@par_id and [ite_feat]=@par_feat", conn);
Our community of experts have been thoroughly vetted for their expertise and industry experience.
The Distinguished Expert awards are presented to the top veteran and rookie experts to earn the most points in the top 50 topics.