Access should not block MonthName() function in sandbox mode.

N

Neil Laslett

The Access MonthName VBA function is not available to external SQL queries
after installing JET SP8 with sandbox mode enabled. This means that ASP
pages making OLEDB queries to Access tables cannot use this function. This
is a real pain and makes parsing recordsets slower and more cumbersome.

----------------
This post is a suggestion for Microsoft, and Microsoft responds to the
suggestions with the most votes. To vote for this suggestion, click the "I
Agree" button in the message pane. If you do not see the button, follow this
link to open the suggestion in the Microsoft Web-based Newsreader and then
click "I Agree" in the message pane.

http://www.microsoft.com/office/com...9c5e&dg=microsoft.public.access.modulesdaovba
 
A

Allen Browne

Neil, agreed that some of the sandbox changes are a pane.

For a workaround, could you use:
Format([MyDateField], "mmmm")
 
G

Guest

http://office.microsoft.com/en-us/assistance/HP010446591033.aspx

Yes, but the rest of the story is still missing.

Quoting from that reference:

"If you enable sandbox mode without installing Jet 4.0 SP 8 or
later, certain features will not work. For example, wizards will "

So why is it not working after you have installed SR8?

No-one knows. Or at least no-one has admitted knowing.

(david)


Neil Laslett said:
Sorry for the bulky wording...didn't realize it was going to post as-is.

Even with sandbox mode disabled (in the registry), the function call still
fails:

Error Type:
Microsoft JET Database Engine (0x80040E14)
Undefined function 'MonthName' in expression.

For more info, see:
http://office.microsoft.com/en-us/assistance/HP010446591033.aspx

See
http://www.microsoft.com/office/com...9c5e&dg=microsoft.public.access.modulesdaovba
 
D

Dirk Goldgar

Neil Laslett said:
The Access MonthName VBA function is not available to external SQL
queries after installing JET SP8 with sandbox mode enabled. This
means that ASP pages making OLEDB queries to Access tables cannot use
this function. This is a real pain and makes parsing recordsets
slower and more cumbersome.

I don't think the MonthName function, or any other VBA function, is
going to be available to queries made from outside Access, regardless of
sandbox mode or the Jet SP you have installed. The expression service
wouldn't be running in that case.
 
G

Guest

:~)

User Defined Functions are not available outside Access.
Most VBA functions are available when using DAO.
I've never used enough OLEDB to know what is accepted.

(david)
 
N

Neil Laslett

Thanks for the feedback. Format() isn't supported, replaced by
FormatDateTime() - which is also on the disabled list. Very frustrating.

I finally ended up writing a function in ASP and calling it whenever I need
the formatted string. It would be easier to have the formatted string in the
recordset, but at least I'm up and running.

-Neil

Allen Browne said:
Neil, agreed that some of the sandbox changes are a pane.

For a workaround, could you use:
Format([MyDateField], "mmmm")

--
Allen Browne - Microsoft MVP. Perth, Western Australia.

Reply to group, rather than allenbrowne at mvps dot org.

Neil Laslett said:
Sorry for the bulky wording...didn't realize it was going to post as-is.

Even with sandbox mode disabled (in the registry), the function call still
fails:

Error Type:
Microsoft JET Database Engine (0x80040E14)
Undefined function 'MonthName' in expression.

For more info, see:
http://office.microsoft.com/en-us/assistance/HP010446591033.aspx

See
 
B

Brendan Reynolds

Format is not supported where, Neil? In VBScript? If so, that doesn't
matter, as the JET database engine uses the VBA expression service, not
VBScript. You should still be able to use Format in your SQL string, even if
you can't use it in your VBScript code.

--
Brendan Reynolds

Neil Laslett said:
Thanks for the feedback. Format() isn't supported, replaced by
FormatDateTime() - which is also on the disabled list. Very frustrating.

I finally ended up writing a function in ASP and calling it whenever I
need
the formatted string. It would be easier to have the formatted string in
the
recordset, but at least I'm up and running.

-Neil

Allen Browne said:
Neil, agreed that some of the sandbox changes are a pane.

For a workaround, could you use:
Format([MyDateField], "mmmm")

--
Allen Browne - Microsoft MVP. Perth, Western Australia.

Reply to group, rather than allenbrowne at mvps dot org.

Neil Laslett said:
Sorry for the bulky wording...didn't realize it was going to post
as-is.

Even with sandbox mode disabled (in the registry), the function call
still
fails:

Error Type:
Microsoft JET Database Engine (0x80040E14)
Undefined function 'MonthName' in expression.

For more info, see:
http://office.microsoft.com/en-us/assistance/HP010446591033.aspx

See

:

The Access MonthName VBA function is not available to external SQL
queries
after installing JET SP8 with sandbox mode enabled. This means that
ASP
pages making OLEDB queries to Access tables cannot use this function.
This
is a real pain and makes parsing recordsets slower and more
cumbersome.

----------------
This post is a suggestion for Microsoft, and Microsoft responds to the
suggestions with the most votes. To vote for this suggestion, click
the
"I
Agree" button in the message pane. If you do not see the button,
follow
this
link to open the suggestion in the Microsoft Web-based Newsreader and
then
click "I Agree" in the message pane.

http://www.microsoft.com/office/com...9c5e&dg=microsoft.public.access.modulesdaovba
 
N

Neil Laslett

Thanks Brendan, you're right on the money.
Format() works fine in VBA, even if not in VBScript, and causes no problem
when called in a query from ASP. Problem fixed.

So the question for Microsoft:
Why does Format([Date]), "mmmm") work, but not MonthName([Date])?

Brendan Reynolds said:
Format is not supported where, Neil? In VBScript? If so, that doesn't
matter, as the JET database engine uses the VBA expression service, not
VBScript. You should still be able to use Format in your SQL string, even if
you can't use it in your VBScript code.

--
Brendan Reynolds

Neil Laslett said:
Thanks for the feedback. Format() isn't supported, replaced by
FormatDateTime() - which is also on the disabled list. Very frustrating.

I finally ended up writing a function in ASP and calling it whenever I
need
the formatted string. It would be easier to have the formatted string in
the
recordset, but at least I'm up and running.

-Neil

Allen Browne said:
Neil, agreed that some of the sandbox changes are a pane.

For a workaround, could you use:
Format([MyDateField], "mmmm")

--
Allen Browne - Microsoft MVP. Perth, Western Australia.

Reply to group, rather than allenbrowne at mvps dot org.

Sorry for the bulky wording...didn't realize it was going to post
as-is.

Even with sandbox mode disabled (in the registry), the function call
still
fails:

Error Type:
Microsoft JET Database Engine (0x80040E14)
Undefined function 'MonthName' in expression.

For more info, see:
http://office.microsoft.com/en-us/assistance/HP010446591033.aspx

See

:

The Access MonthName VBA function is not available to external SQL
queries
after installing JET SP8 with sandbox mode enabled. This means that
ASP
pages making OLEDB queries to Access tables cannot use this function.
This
is a real pain and makes parsing recordsets slower and more
cumbersome.

----------------
This post is a suggestion for Microsoft, and Microsoft responds to the
suggestions with the most votes. To vote for this suggestion, click
the
"I
Agree" button in the message pane. If you do not see the button,
follow
this
link to open the suggestion in the Microsoft Web-based Newsreader and
then
click "I Agree" in the message pane.

http://www.microsoft.com/office/com...9c5e&dg=microsoft.public.access.modulesdaovba
 
Top