S
Stan Graziano
I've got a macro, JanMacro, which is called from a procedure JanMacroRunner.
If I execute the procedure from inside Access, the macro correctly exports a
query to a .dbf file. However, if I call the procedure via COM as shown
below, the COM object succeeds (it doesn't throw an exception like it would
if I used a non-existant procedure name), but there is no .dbf file written
to the filesystem. What's going on, and how can I diagnose this?
Thanks in advance. Here is the c# asp.net serverside code I'm using to call
the procedure:
....
Access.ApplicationClass oAccess = new Access.ApplicationClass();
oAccess.Visible = true;
oAccess.OpenCurrentDatabase(path, false, "");
// Run the macros.
RunMacro(oAccess, new Object[]{"JanMacroRunner"});
......
private void RunMacro(object oApp, object[] oRunArgs)
{
oApp.GetType().InvokeMember("Run",
System.Reflection.BindingFlags.Default |
System.Reflection.BindingFlags.InvokeMethod,
null, oApp, oRunArgs);
}
If I execute the procedure from inside Access, the macro correctly exports a
query to a .dbf file. However, if I call the procedure via COM as shown
below, the COM object succeeds (it doesn't throw an exception like it would
if I used a non-existant procedure name), but there is no .dbf file written
to the filesystem. What's going on, and how can I diagnose this?
Thanks in advance. Here is the c# asp.net serverside code I'm using to call
the procedure:
....
Access.ApplicationClass oAccess = new Access.ApplicationClass();
oAccess.Visible = true;
oAccess.OpenCurrentDatabase(path, false, "");
// Run the macros.
RunMacro(oAccess, new Object[]{"JanMacroRunner"});
......
private void RunMacro(object oApp, object[] oRunArgs)
{
oApp.GetType().InvokeMember("Run",
System.Reflection.BindingFlags.Default |
System.Reflection.BindingFlags.InvokeMethod,
null, oApp, oRunArgs);
}