We're a community of 1077K IT Pros here for help, advice, solutions, professional growth and fun. Join us!
1,076,503 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Start New Discussion Reply to this Discussion

Undefined function 'MonthName' in expression in c# stored query

Hi

I have a c# console app that calls some access 2007 queries. One of these queries throws an error "Undefined function 'MonthName' in expression".

I understand that some functions that are available in VBA cant be called from c# and if i comment out the 'monthname' function the call works fine. However it would be better if i could find a way to work round the issue instead of deleting the function.

Can anyone shed any light?

Many thanks.

2
Contributors
2
Replies
18 Hours
Discussion Span
2 Years Ago
Last Updated
3
Views
jlivvers
Light Poster
26 posts since Oct 2010
Reputation Points: 10
Solved Threads: 0
Skill Endorsements: 0

What's the query and can't you just get the month name in C# if you need to?

Momerath
Senior Poster
3,730 posts since Aug 2010
Reputation Points: 1,336
Solved Threads: 624
Skill Endorsements: 13

What's the query and can't you just get the month name in C# if you need to?

Hi Momerath,

yes I think that may be the way to go. I was just wondering if there was something in c# that i was missing!

The query is below

GFMonthName: IIf([Frequency]=1 And [Type]="Regular",MonthName(DatePart("m",[DD Start Date])),Null)
jlivvers
Light Poster
26 posts since Oct 2010
Reputation Points: 10
Solved Threads: 0
Skill Endorsements: 0

This article has been dead for over three months: Start a new discussion instead

Post: Markdown Syntax: Formatting Help
 
You
View similar articles that have also been tagged:
 
© 2013 DaniWeb® LLC
Page rendered in 0.0602 seconds using 2.7MB