Quantcast
Channel: Microsoft Dynamics AX Forum - Recent Threads
Viewing all articles
Browse latest Browse all 175888

C# .Net connector query syntax regarding dates

$
0
0

Hi,

Been working with the .net business connector on a c# web app and I am having bother mastering the syntax around dates when a where is used.

I am trying to use the selected date from a calendar control to be queried against a TransDate field (not date and time) on a table inside AX.

I am an experienced AX developer but a novice in c# so please bear with me.

Can anyone advise me with exact syntax examples of a where clause used with a query using the business connector.

For reference the error I am getting is:

DynRec.ExecuteStmt("select * from %1 where %1.ProjId =='" + ProjId.Text + "' && %1.TransDate ==" + Calendar1.SelectedDate);

I know this is incorrect but I have also put the date out to string and added quotation marks etc etc

Thanks in advance


Viewing all articles
Browse latest Browse all 175888

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>