Data Macros Don't Work With Linked Tables???

N

Neil

I have an Access 2010 ACCDB with an AfterInsert data macro on a table. Works
fine. However, when I link that table to the front end (another 2010 ACCDB),
the AfterInsert data macro is not triggered!

That seems to defeat the purpose of having data macros, that the macro is
tied to the table itself and is run regardless of how the data is entered
into the table.

So, in a traditional front end/back end setup, both in 2010, the data macro
is not executed?? That seems to defeat the entire purpose of having data
macros.

Otherwise, what might I be doing wrong here? I even have both the front end
and back end file open, just in case that was an issue.

Thanks!

Neil
 
N

Neil

I should note that I'm using the data macro to call a VBA function (by
setting a local macro variable to the result of the function call). So maybe
that's the problem - that I'm using a workaround to data macros not having a
native Run Code command, as a regular macro does. Since this isn't for the
web, I didn't see a problem with calling a VBA function (and various places
I've seen online mentioned workarounds for calling VBA from a data macro).
But, again, while it works when I insert a record in the back end directly,
it doesn't work when inserting a record through the linked table in the
front end.

Any ideas?

Thanks!
 
A

Albert D. Kallal

"Neil" wrote in message
I have an Access 2010 ACCDB with an AfterInsert data macro on a table.
Works fine. However, when I link that table to the front end (another 2010
ACCDB), the AfterInsert data macro is not triggered!

That is not my experience. The before change and after update and after
insert event triggers fire.

Remember, the after insert fires, the after update will not. And if you just
edit a record, then the after update only fires, and the after insert does
not.

And in all cases, the before change event does fire.

So, I not sure what you doing different here, but those triggers fire + run,
and in fact they fire + run without even Access having been installed.

Of course the other application open to the back end would have to "refresh"
the record or table to see the changes, but nothing different here.

So, the triggers do run when split. It not clear what you doing here - do
keep in mind that in the after update event, of course the current record is
read only but that makes a lot of sense if you think about this.


-- Albert D. Kallal
Edmonton, Alberta Canada
(e-mail address removed)
 
N

Neil

Hi, Albert, thanks for the reply.

Yeah, the only one I'm using is the AfterInsert event - to be executed after
a new record is inserted. Works fine in the back end.

Did you happen to see my follow-up note? In it I added that I was using the
AfterInsert macro to run some VBA code (by setting a local variable to the
result of a function call). Maybe that's the problem?

Thanks so much!

Neil
 
A

Albert D. Kallal

"Neil" wrote in message
I should note that I'm using the data macro to call a VBA function (by
setting a local macro variable to the result of the function call). So maybe
that's the problem

Yes, in this case, you need a copy of the VBA in the front end. (for testing
you can place it in both - since if you happen to open the back end table
directly, then the VBA code is ALSO required since the front end might not
even be open and the back end has no idea which of the 10,000 accDB files to
talk to that may be sitting on your computer.

So when the trigger fires, that VBA code will be required. So, the VBA needs
to exist in the front end if that all you opened.

However, if you open JUST the back end, then obviously the VBA will also be
needed. So, as a general rule, you should maintain that VBA code in both FE
and BE.
I didn't see a problem with calling a VBA function

Right, but if you have 20,000 front ends to that database, where is the VBA
going to reside?

You not opening the back end, and in the past for 18 years, when you opened
a Access application because you had some linked tables, that NEVER
suggested or enabled you could run the VBA code modules in the back end and
this has not changed.

So this setup for the past 18 years in regards to VBA has not changed.

The VBA code you use will have to be "available", the VBA like for the past
18 years will have to be placed in the front end and this is not new.

So, the trigger will be in the back end, but the function(s) in VBA used
will have to be in the front end, since if you use VBA, then you need that
VBA INSIDE of the application you are running.

The triggers can and will run independent of VBA. If you open that back end
with FoxPro or VB.net, then any row updates will run those ACE triggers. In
these cases Access is not even loaded nor is VBA loaded. And thus triggers
that use VBA code would obviously have to have something with VBA loaded.

I mean, just because vb.net or FoxPro via ODBC opens a accDB file, that
would not suggest that those programs can all of a sudden run VBA code in a
Access module.

In the past, if some developer used JET to open a mdb file, that would not
suggest that the VBA and forms and code is ALSO required and as pointed out
in the past you NEVER had to have Access installed on a computer to use JET,
and the same applies to ACE - you don't need Access loaded or installed for
those triggers to run.

So, using a "kluge" to get a expression function to run VBA simply means
that that WHEN + WHERE the code runs has to be available.

It is not "new" news that if you calling a VBA function, that VBA code has
to be available in the CURRENT application and not in some other application
on your next computer station or sitting in the 15 or 20 databases that your
front end is currently linked to. In other words just because you link to 15
different databases does not suggest that you can call/run that VBA code.

In other words, if you can in the debug window or code editor call that
function, then you can run that function. And if in the debug window or code
editor NOT call that code, then the VBA function cannot be used. How this
works actually has NOT changed at all.

So, if you going to run a VBA function, then you need that VBA function, and
just like using that VBA function in a query, that VBA would have to be in
the front end.
 
N

Neil

Yes, in this case, you need a copy of the VBA in the front end. (for
testing

OK, I tried it, and it worked. Thanks. But still a problem (see below).
Right, but if you have 20,000 front ends to that database, where is the
VBA going to reside?

Well, my thinking was that, since the data macro was in the back end, it
would call a VBA function in the back end, as well. I figured, if it could
access a macro, why not a function? Anyway, obviously my thinking was wrong,
but that's what I was thinking - that it would call the VBA function stored
in the back end.
So this setup for the past 18 years in regards to VBA has not changed.

Right - except we have a back end macro calling a front end function. That
doesn't seem any more logical than a back end macro calling a back end
function. LOL But, OK. I accept that's the way it is. :)
The triggers can and will run independent of VBA. If you open that back
end with FoxPro or VB.net, then any row updates will run those ACE
triggers. In these cases Access is not even loaded nor is VBA loaded. And
thus triggers that use VBA code would obviously have to have something
with VBA loaded.

I mean, just because vb.net or FoxPro via ODBC opens a accDB file, that
would not suggest that those programs can all of a sudden run VBA code in
a Access module.

Right, good point. I was thinking that it would only work if Access was
opened. Obviously my logic was stretching it, in the case of a different app
like FoxPro.

Which brings me to my aforementioned problem. The record isn't actually
being inserted by an Access front end (I was only using that to test whether
the data macro would work with linked tables). The record is being inserted
by another application called KEPServer. This app links to the Access table
and inserts the record.

So it seems I'm SOL here. Seems there's no way to make this work, with
having the code run when a record is inserted. Guess my only other option is
to use a timer to periodically run the code against the newly-inserted
records.

Any final thoughts?...

Thanks so much for your help, Albert!

Neil
 
N

Neil

One other question, Albert. Since it seems I won't be able to use a data
macro to run my code, I have to find another solution. As mentioned in the
previous post, one idea is a timer.

However, all the code does is copy some records to another table, and
perform some calculations, and write them to a calculations table. These
results are then reported on.

So, theoretically, I could just run the code for all unprocessed records
whenever a report is opened. That would work fine.

Only one problem: we are planning on having a SharePoint interface for
viewing the data, as well.

My original plan was to write the calculations to a table that was shared by
the Access and SharePoint UIs. If the calculated data was updated whenever a
record was added to the raw data table, then that would work fine. But if
the calculated data is going to be updated whenever the report is opened,
then that wouldn't work if the data is viewed in SharePoint, since there
would be no way to trigger the update in the Access database.

So I'm back to square one - needing to use a timer, unless there's anything
you see that I'm not seeing.

Thanks so much!

Neil
 
A

Albert D. Kallal

Neil" wrote in message
Right - except we have a back end macro calling a front end function. That
doesn't seem any more logical than a back end macro calling a back end
function. LOL But, OK. I accept that's the way it is. :)

Well, jet in this case is ALSO running in your front end. It not a separate
process. Your front end launches Access + JET. All code (including that
macro) is still running in the front end program and process. This is like
JET reading a table and knowing how to cascade delete. The "definition" to
cascade delete is in the back end, but JET + code is running as a process in
the front end. So think of the macro code much like a "definition" to
cascade delete.
So it seems I'm SOL here. Seems there's no way to make this work, with
having the code run when a record is inserted. Guess my only other option
is to use a timer to periodically run the code against the newly-inserted
records.

Any final thoughts?...

Why not write all that code as a macro? I mean if it just some updates, then
I don't see the problem?

I mean I written Tic Tac Toe games and soundex routines in table macros. So
some updating of a few records cannot be that hard?

I mean, given a choice between some timer code in a front end as compared to
a stand alone macro that runs independent of Access and runs all the time
without even Access having to be launched seem to be a real winning choice
here. I mean one would not attempt to have triggers and store procedures on
SQL server attempt to call some Access VBA front end that may not not be
loaded?

I mean, you have this great new table code system, and you trying to
"escape" outside of that new feature and use external code and an external
system? I would not do this with sql server store procedures to call outside
code systems nor should one attempt to do this with Access. The whole idea
of triggers is a engine level code system that runs independent of the
application and that is quite much what triggers have always been about.

Simple write your update routines as table macros and then Access will not
have to be loaded and you not have to worry about who or what code or
program system causes those table triggers and stored code to run.
 
N

Neil

Well, jet in this case is ALSO running in your front end. It not a
separate
process. Your front end launches Access + JET. All code (including that
macro) is still running in the front end program and process. This is like
JET reading a table and knowing how to cascade delete. The "definition" to
cascade delete is in the back end, but JET + code is running as a process
in the front end. So think of the macro code much like a "definition" to
cascade delete.

That makes sense, actually. I was thinking that if the back end was open and
running in its own copy of Access, that it would be able to run the code.
But I see now that everything's happening in the front end, so the function
being in the back end isn't relevant.
Why not write all that code as a macro? I mean if it just some updates,
then I don't see the problem?

Well, there is some very complex code that performs calculations, and then
writes the results to the tables. So it's not just updates. I can't even
imagine translating the complexity of my VBA code into macros. It would be a
nightmare. LOL
I mean I written Tic Tac Toe games and soundex routines in table macros.
So some updating of a few records cannot be that hard?

Well, you're obviously a better man than me. :)
I mean, given a choice between some timer code in a front end as compared
to a stand alone macro that runs independent of Access and runs all the
time without even Access having to be launched seem to be a real winning
choice here. I mean one would not attempt to have triggers and store
procedures on SQL server attempt to call some Access VBA front end that
may not not be loaded?

I wouldn't have the timer code in the front end. I'd probably have it in the
back end, where the data is received, and have it write to another back end
table. This file would just be continually running on the server, so it
wouldn't be user-dependent.

But, yes, I agree: a timer is not the best solution.

But, actually, I think you may have accidentally hit on something there by
mentioning SQL Server. Writing the routine as a t-sql stored procedure would
be very doable. Doing it as a data macro just seems unfathomably complex and
not something I'd even consider. LOL

So that might be the solution: use SQL Server and write the code in t-sql.

Only thing is, another component of this (not yet implemented) is that, once
the calculations are written to the calculation tables, data will be pushed
to SharePoint links, for people to view data on the Web. So that creates
some issues if the back end is in SQL Server.

Unless SQL Server is able to write to SharePoint links?...

I mean, you have this great new table code system, and you trying to
"escape" outside of that new feature and use external code and an external
system?

Yeah, well, this "great new table code system" is very rudimentary and
klunky. I absolutely LOVE the concept of data macros; and I'm thrilled to
use them to do simple updates or whatever. But for complex code? No way. I'd
rather stab my hand repeatedly with a knitting needle. LOL
I would not do this with sql server store procedures to call outside code
systems nor should one attempt to do this with Access. The whole idea of
triggers is a engine level code system that runs independent of the
application and that is quite much what triggers have always been about.

Yes, I understand.

Thanks, Albert!

Neil
 
A

Albert D. Kallal

"Neil" wrote in message
Well, there is some very complex code that performs calculations, and then
writes the results to the tables. So it's not just updates. I can't even
imagine translating the complexity of my VBA code into macros. It would be
a nightmare. LOL

Well, to be really honest, I've always thought that t-sql was a pretty weak
and lousy programming language.
Well, you're obviously a better man than me. :)

The macro programming language is limited, but it's surprisingly powerful. I
mean it has most of the standard VBA functions, and It has a basic ability
to consume queries. So when you run the macro code, you can type a SQL
select in place of the table name, or use a saved query.

I'm certainly not going to claim that macros are the equivalent of t-sql,
but t-sql is also a weak language when compared to VBA.
Writing the routine as a t-sql stored procedure would be very doable. Doing
it as a data macro just seems unfathomably complex and not something I'd
even consider. LOL
Only thing is, another component of this (not yet implemented) is that,
once the calculations are written to the calculation tables, data will be
pushed to SharePoint links, for people to view data on the Web. So that
creates some issues if the back end is in SQL Server.

The above just suggests how valuable these new table macros are. You can
write them once in the desktop client, and if you happen to publish to the
web, the exact same code and system works up in the cloud with office 365 or
SharePoint One of the reasons why so many Access developers don't use things
like SQL Server is because of a hard learning curve, and also in having to
adopt multiple programming languages and multiple coding systems and also
multiple sets of editors and multiple sets of development tools. I mean
just how many editors and IDE and large complex systems does one have to
adopt to write a little bit of update code in a trigger?

The fact that we can use the same code system on JET (ACE), on SharePoint,
and office 365 seems to me a pretty amazing choice.
Unless SQL Server is able to write to SharePoint links?...

Unfortunately right now, we cannot use BCS (Business connectivity services)
with published access applications, and I really wish we could. Hopefully
this feature will arrive in the future, and this would open the doors and
ability to use SQL server for the back end, and then of course I'm going to
be using .net assemblies for those store procedures.
Unless SQL Server is able to write to SharePoint links?...

The problem is the whole SharePoint infrastructure deals with xml and
complex data structures, something that access and multi value fields handle
significantly better than does SQL server right now. It really is remarkable
how often I see some .net developers attempt to use Access (ACE data engine)
to update data on SharePoint, because access has all these new way cool bits
and parts built in to deal with the fact that more and more business data is
now residing in web based systems, and a big portion of that data is not in
relational format anymore .

I cannot say the SQL server community is nervous, but more and more
businesses now are throwing up data into web based content management
systems like SharePoint, and less of that data is landing in some server SQL
based system. The reason for this is just an actual progression of how web
data is created stored, and the tools and data tends to be xml based.

As a result, if more more data is stored in these web based content systems,
then that means less and less business data is winding up as being stored in
a SQL server table (at least in a logical sense, since SharePoint systems
behind the scenes actually use SQL server as a data file system). I think I
one of the few who think loves the idea of Access being married to
SharePoint.
Yeah, well, this "great new table code system" is very rudimentary and
klunky. I absolutely LOVE the concept of data macros; and I'm thrilled to
use them to do simple updates or whatever. But for complex code? No way.
I'd rather stab my hand repeatedly with a knitting needle. LOL

True, but do you think the following soundex code I wrote as Access macros
would be any easier to write in t-sql?

http://www.kallal.ca/searchw/WebSoundex.htm

Take a look at the screen shot of the VBA code, and then the screen shot of
the macro code, I don't think they look really that much different.

For sure I'm not going to stand here in sugar code that the macro language
is a great programming language, but compared to some of the server side
database scripting languages like t-sql, and others, It's actually not that
far off. In fact I'm quite comfortable in stating that most of the database
trigger languages and systems are rather lame.

In fact, as I pointed out, I'm one of the few people that for 10 years
desperately wanted something like the new ability to take a .net assembly
and publish that up to SQL server and use that for a store procedure. That
way you get a great decent debugger and programming language, and you don't
have to learn a completely new system and syntax for just using some table
triggers or store procedures on a server. In fact, I'd be pretty happy if
..net assemblies were added to access web as services for the store
procedures .

And you can try my Tic Tac Toe game here:
(written in Access Web) and I will leave open the port for a few more days -
anyone here - you can try my web based Tic Tac Toe game in Acces here:

68.151.51.125:37116/TicTac/default.aspx

For the logon, just choose forms authentication

UserName fun
Password fun

Above both lower case. The above will be up for a few more days.
 
N

Neil

I'm certainly not going to claim that macros are the equivalent of t-sql,
but t-sql is also a weak language when compared to VBA.

Agreed! Still, it seems far more manageable than the macro language for
complex functions. But I'll give the macro language another consideration.
Maybe when I'm completely done with the VBA I'll look to port it to the
macro language. That seems like a better idea than tweaking &
troubleshooting in the macro language.

Hey, just thought of something. Someone could make a fortune writing a
program that converted VBA code to macro code! Would be rather tricky; and
the VBA would have to be in a certain format, I'd assume. Still, I'd buy a
copy of that software!! LOL

The above just suggests how valuable these new table macros are. You can
write them once in the desktop client, and if you happen to publish to the
web, the exact same code and system works up in the cloud with office 365
or SharePoint One of the reasons why so many Access developers don't use
things like SQL Server is because of a hard learning curve, and also in
having to adopt multiple programming languages and multiple coding systems
and also multiple sets of editors and multiple sets of development tools.
I mean just how many editors and IDE and large complex systems does one
have to adopt to write a little bit of update code in a trigger?

Agreed. Still SQL Server's a valuable tool, especially for large databases.
The fact that we can use the same code system on JET (ACE), on SharePoint,
and office 365 seems to me a pretty amazing choice.
Agreed!

The problem is the whole SharePoint infrastructure deals with xml and
complex data structures, something that access and multi value fields
handle significantly better than does SQL server right now. It really is
remarkable how often I see some .net developers attempt to use Access (ACE
data engine) to update data on SharePoint, because access has all these
new way cool bits and parts built in to deal with the fact that more and
more business data is now residing in web based systems, and a big portion
of that data is not in relational format anymore .

This is highly ironic, given that, not too long ago, Microsoft tried to kill
the Jet engine and replace it with "SQL Server everywhere." Like so many
Microsoft ideas-du-jour, it failed miserably. But I find what you write
above highly ironic, given the direction that Microsoft tried to go in.
True, but do you think the following soundex code I wrote as Access macros
would be any easier to write in t-sql?

http://www.kallal.ca/searchw/WebSoundex.htm

Would it have been easier in t-sql? Yes, I think so. Definitely.

Here's the thing. The macro language is definitely a great advance over
previous the previous macro language; but it's still clunky to work with. At
least with t-sql you can copy and paste, comment out code, etc. Makes
writing and troubleshooting much simpler.

I'll grant you that working with the macro language isn't that far off from
using t-sql (though I'd still say that t-sql is more feature-rich and
simpler to work with). But you've definitely convinced me to give the macro
coding another consideration.
Take a look at the screen shot of the VBA code, and then the screen shot
of the macro code, I don't think they look really that much different.

Perhaps not. But that's a fairly simple VBA routine. When you end up with 3
recordsets open at the same time, things would get very convoluted very
quickly.

Granted, might not be too much simpler in t-sql. But, again, at least it has
a regular editor.

The macro language, though, has the advantage that it uses native VBA
functions. So, theoretically, one could write and troubleshoot in VBA, and
then simply port to the macro language (and keep the original VBA around for
modifications/troubleshooting/re-porting (again - where's that VBA to macro
converter that I can purchase?? :) )).

So I think that's an advantage of the macro language over t-sql: that you
can write it in VBA and then just mirror your VBA in the Access macro
language.
And you can try my Tic Tac Toe game here:
(written in Access Web) and I will leave open the port for a few more
days - anyone here - you can try my web based Tic Tac Toe game in Access
here:

68.151.51.125:37116/TicTac/default.aspx

For the logon, just choose forms authentication

UserName fun
Password fun

Very nice!!! Loved it!! And loved your buttons!

Tell me: how did you do the logic? Was that your own logic, or did you find
a "tic-tac-toe engine" somewhere? :) I'm ashamed to say that I couldn't
beat the computer. Best I could hope for was a tie. I'm a miserable failure
of a human being... :-((

;-)

Neil
 
A

Albert D. Kallal

"Neil" wrote in message
Maybe when I'm completely done with the VBA I'll look to port it to the
macro language. That seems like a better idea than tweaking &
troubleshooting in the macro language.

The above is what I done in the past. In fact, my Tic Tac Toe game, I
got the code working in VBA first, got the bugs out, and THEN converted
to macro.
Hey, just thought of something. Someone could make a fortune writing a
program that converted VBA code to macro code! Would be rather tricky; and
the VBA would have to be in a certain format, I'd assume. Still, I'd buy a
copy of that software!! LOL

The problem is you're dealing with different architectures, it's the
difference between a good quality heavy duty trucks, and that of aircraft.
Aircraft are lighter weight, use more expensive materials, and big heavy
duty bench seats, or large diesel engines don't work well for Aircrafts.

We could for example come up with the idea of placing helicopter blades on
airplanes, write this up and tell Boeing we've just come up with a brilliant
idea how to eliminate the need for airports.

The problem is for those database triggers, you don't have a message box
command, you don't have record sets, you don't have global variables, and
the list goes on and on and on.

If you give a person the VBA editor they would be so disappointed because so
many things would be so changed. It probably would not be worth the effort
to allow them to continue to use an old VBA editor since then that gives the
SAME expectations as VBA. There would be so many things changed that basic
features of the language would not exist anymore.

We never saw a converter from VB6 to vb.net, And the reason was the
architecture change.

We don't have record sets in a web form And last time I looked the safari
web browser running on your right pad dozen have support for those
recordsets. The trek and problem is, you won a system in which you can write
some code that eventually runs on the user's desktop or not ?
This is highly ironic, given that, not too long ago, Microsoft tried to
kill
the Jet engine and replace it with "SQL Server everywhere." Like so many
Microsoft ideas-du-jour, it failed miserably. But I find what you write
above highly ironic, given the direction that Microsoft tried to go in.

I don't believe they tried to kill jet. In fact by access 2003 they'd
already listened to the developer community, and DAO had returned as the
default data object model after an absence going all the way back to access
97. I mean 10 years in computer history, is an enormous amount of time, and
I can't count on my hands very many tools I've used for longer than 10
years, and we're in the realm of at least 9 years that JET has been promoted
and in fact has been the default data engine for at least the last 9 years
of Access.

So while Access had a fling with ADO, I cannot recall a period in which the
Access JET data engine was being depreciated.
Would it have been easier in t-sql? Yes, I think so. Definitely.

Hum, close call here. I cannot say the functions and ability of t-sql would
have helped much more here, about the only exception of maybe a looping
command .
Here's the thing. The macro language is definitely a great advance over
previous the previous macro language; but it's still clunky to work with.
At least with t-sql you can copy and paste, comment out code, etc. Makes
writing and troubleshooting much simpler.

Well the macro editor does allow cut and paste, and in fact if you hold down
the control key you can drag and drop code and create new blocks, Kind of
something I wish I had in the VBA editor. I mean don't get me wrong, but
part of the problem with an editor is that they had to remain compatibility
with the past macro language.

Furthermore when you're writing code in a WEB form, you need to dynamically
change which expressions and feature sets are available, because some of the
commands are going to run server side with near VBA function set, and the
next line you write will NOT have all those features. Trying to implement
that in a free form text editor would not work all that particular well.

I mean due one editor for VBA (which is common to ALL of office), another
editor for the old macro language, a new editor for the web form scripting,
a new editor for table triggers? That means we up to 4 or 5 editors here!

By adopting a new macro editor, they eliminated at least the need for 3
different kinds of editors here, and this keeps code compatibility with the
previous macro system that's been around for a very long time .
The macro language, though, has the advantage that it uses native VBA
functions. So, theoretically, one could write and troubleshoot in VBA, and
then simply port to the macro language (and keep the original VBA around
for modifications/troubleshooting/re-porting (again - where's that VBA to
macro converter that I can purchase?? :) )).

As I pointed out, I'd don't maintain the older Phoebe a version of code, but
for testing routines and getting something working, I do in fact were often
write it in VBA.

I mean once the code is up and running, then a few tweaks and changes
generally does not result in in need of debugging or much modifications
anyway .
And you can try my Tic Tac Toe game here:
68.151.51.125:37116/TicTac/default.aspx

UserName fun
Password fun
Very nice!!! Loved it!! And loved your buttons!
Tell me: how did you do the logic? Was that your own logic, or did you find
a "tic-tac-toe engine" somewhere? :)

I use the following article that laid out a set a pattern matching for the
basic moves:

http://webster.cs.ucr.edu/AsmTools/MASM/TicTacToe/ttt_1.html
I'm ashamed to say that I couldn't beat the computer. Best I could hope
for was a tie. I'm a miserable failure of a human being... :-((

It is true that Tic Tac Toe is boring and simple!
However, I am thinking of extending this idea and next time around I will
build a chess game.

In fact what is quite amazing, is I built the whole game in basically what
amounts to a whole evening, I used part of a Saturday night and Sunday
night, and the whole thing was up and running. I suspect that perhaps a lot
of the VBA developers here would have a hard time building an application in
VBA.

So the trick here is that I used the macro system enough that I understand
exactly what designs will work and what designs will not - This skill set in
fact is far more important than learning the macro language itself !

In other words knowing what designs to avoid, knowing what designs will not
work is just as important here.

And I suppose it helps with past experience having programmed in systems
like assembler since in those systems you're dealing with VERY simplified
sets of commands, and therefore it your software designs and skills that
make up for the lack of functionality in the language you're using.

Everybody's used to say that real programmers are those that write code in
assembler! It turns out that most assembler systems are not much more
difficult than that of using a programmable calculator, The challenge of
assembler is not the complex of the language. In fact assembler is so dead
simple and that is the problem. So it is the reverse in that simple problems
become complex because you're using such a simple set of commands to solve
problems.

I suspect the above a reason is why I had so much success with access web
services, because I have a lot of experience in this industry, and I've used
a lot of systems with even less functionality and ability than access web
services to develop business applications with.
 
N

Neil

The problem is you're dealing with different architectures, it's the
difference between a good quality heavy duty trucks, and that of aircraft.
Aircraft are lighter weight, use more expensive materials, and big heavy
duty bench seats, or large diesel engines don't work well for Aircrafts.

We could for example come up with the idea of placing helicopter blades on
airplanes, write this up and tell Boeing we've just come up with a
brilliant idea how to eliminate the need for airports.

The problem is for those database triggers, you don't have a message box
command, you don't have record sets, you don't have global variables, and
the list goes on and on and on.

Right, there would have to be a limitation of which commands could be used,
and the conversion software would have to check the code and flag the
illegal commands.

But, in any case, I was kind of joking about the whole thing... ;-)
I don't believe they tried to kill jet. In fact by access 2003 they'd
already listened to the developer community, and DAO had returned as the
default data object model after an absence going all the way back to
access 97. I mean 10 years in computer history, is an enormous amount of
time, and I can't count on my hands very many tools I've used for longer
than 10 years, and we're in the realm of at least 9 years that JET has
been promoted and in fact has been the default data engine for at least
the last 9 years of Access.

So while Access had a fling with ADO, I cannot recall a period in which
the Access JET data engine was being depreciated.

Microsoft put out a notice a while back saying the JET engine was being
deprecated, and that the current version (4.0) would be the final version.
There was a panic within the Access community, with many saying, "Oh well,
it was a good run," and considering what their options would be in the
future. Many posts were posted here in this newsgroup about it.

This was about the same time that Microsoft was pushing their "SQL Server
everywhere" philosophy, came out with the Desktop version of SQL, etc.

And my understanding is that the general JET engine itself "technically" was
deprecated, and Microsoft didn't put another version of the general JET
engine (so, technically, they kept their word about deprecating it). But
they instead developed the Office JET engine (ACE) that was intended only
for use with Office (as opposed to the general JET engine, which was a
general purpose engine, included in Windows). That allowed the Access team
to make many long-needed changes, since the JET engine was now
Office-specific, rather than being a general engine.

That last paragraph about the transition from the deprecated general JET
engine to the Office JET engine I'm not entirely clear on. But I know for a
fact that JET was listed for a while in a Microsoft document under
technologies that were being deprecated. And I know for a fact that this was
discussed at length here.
Furthermore when you're writing code in a WEB form, you need to
dynamically change which expressions and feature sets are available,
because some of the commands are going to run server side with near VBA
function set, and the next line you write will NOT have all those
features. Trying to implement that in a free form text editor would not
work all that particular well.

I mean due one editor for VBA (which is common to ALL of office), another
editor for the old macro language, a new editor for the web form
scripting, a new editor for table triggers? That means we up to 4 or 5
editors here!

Well, when writing stored procedures, editors use color coding to highlight
commands, etc. Could have color coding show up if command is appropriate for
context (say, web form), and show in red if not. Similar to one VBA editor
for DAO and ADO. Color coding shows you commands that are not allowed.
By adopting a new macro editor, they eliminated at least the need for 3
different kinds of editors here, and this keeps code compatibility with
the previous macro system that's been around for a very long time .

*shrug* I think they could've maintained compatibility without having a
macro editor. But not an important point, I guess.
It is true that Tic Tac Toe is boring and simple!
However, I am thinking of extending this idea and next time around I will
build a chess game.

Haha - that would be quite an achievement if you could do that in the macro
editor! :)
I suspect the above a reason is why I had so much success with access web
services, because I have a lot of experience in this industry, and I've
used a lot of systems with even less functionality and ability than access
web services to develop business applications with.

I would say that's probably true.

Neil
 
A

Access Developer

I can't count on my hands very many tools
I've used for longer than 10 years, and we're
in the realm of at least 9 years that JET has
been promoted and in fact has been the default
data engine for at least the last 9 years of Access.

Jet (then abbreviated as JET for Joint Engine Technology) came with Access
1.0, in Oct. 1992... and, if you agree that ACE is both the physical and
philosophical descendent of Jet, it's still around -- 'way more than 9
years.

(I don't count the years that ADO was so highly hyped, because it never
found a place in the hearts and minds of the Access community -- just one
more "wild hare" among many "tangents" of data access among the troops in
Redmond. Remember when they used to introduce a "data access method for all
time to come" with each new release of classic Visual Basic?)
 
P

Patrick Finucane

"Neil"  wrote in messagenews:[email protected]...

Well, to be really honest, I've always thought that t-sql was a pretty weak
and lousy programming language.


The macro programming language is limited, but it's surprisingly powerful.. I
mean it has most of the standard VBA functions, and It has a basic ability
to consume queries.  So when you run the macro code, you can type a SQL
select in place of the table name, or use a saved query.

I'm certainly not going to claim that macros are the equivalent of t-sql,
but t-sql is also a weak language when compared to VBA.


The above just suggests how valuable these new table macros are. You can
write them once in the desktop client, and if you happen to publish to the
web, the exact same code and system works up in the cloud with office 365or
SharePoint One of the reasons why so many Access developers don't use things
like SQL Server is because of a hard learning curve, and also in having to
adopt multiple programming languages and multiple coding systems and also
multiple sets of editors and multiple sets of development tools.  I mean
just how many editors and IDE and large complex systems does one have to
adopt to write a little bit of update code in a trigger?

The fact that we can use the same code system on JET (ACE), on SharePoint,
and office 365 seems to me a pretty amazing choice.


Unfortunately right now, we cannot use BCS (Business connectivity services)
with published access applications, and I really wish we could. Hopefully
this feature will arrive in the future, and this would open the doors and
ability to use SQL server for the back end, and then of course I'm going to
be using .net assemblies for those store procedures.


The problem is the whole SharePoint infrastructure deals with xml and
complex data structures, something that access and multi value fields handle
significantly better than does SQL server right now. It really is remarkable
how often I see some .net developers attempt to use Access (ACE data engine)
to update data on SharePoint, because access has all these new way cool bits
and parts built in to deal with the fact that more and more business datais
now residing in web based systems, and a big portion of that data is not in
relational format anymore .

I cannot say the SQL server community is nervous, but more and more
businesses now are throwing up data into web based content management
systems like SharePoint, and less of that data is landing in some server SQL
based system.  The reason for this is just an actual progression of howweb
data is created stored, and the tools and data tends to be xml based.

As a result, if more more data is stored in these web based content systems,
then that means less and less business data is winding up as being storedin
a SQL server table (at least in a logical sense, since SharePoint systems
behind the scenes actually use SQL server as a data file system). I thinkI
one of the few who think loves the idea of Access being married to
SharePoint.


True, but do you think the following soundex code I wrote as Access macros
would be any easier to write in t-sql?

http://www.kallal.ca/searchw/WebSoundex.htm

Take a look at the screen shot of the VBA code, and then the screen shot of
the macro code, I don't think they look really that much different.

For sure I'm not going to stand here in sugar code that the macro language
is a great programming language, but compared to some of the server side
database scripting languages like t-sql, and others, It's actually not that
far off. In fact I'm quite comfortable in stating that most of the database
trigger languages and systems are rather lame.

In fact, as I pointed out, I'm one of the few people that for 10 years
desperately wanted something like the new ability to take a .net assembly
and publish that up to SQL server and use that for a store procedure. That
way you get a great decent debugger and programming language, and you don't
have to learn a completely new system and syntax for just using some table
triggers or store procedures on a server. In fact, I'd be pretty happy if
.net assemblies were added to access web as services for the store
procedures .

And you can try my Tic Tac Toe game here:
(written in Access Web) and I will leave open the port for a few more days -
anyone here - you can try my web based Tic Tac Toe game in Acces here:

68.151.51.125:37116/TicTac/default.aspx

For the logon, just choose forms authentication

UserName    fun
Password      fun

Above both lower case. The above will be up for a few more days.

Does a person, when first considering whether or not to create a web
app or client app, review the required capabilities of the app to
determine which type to use? For example, use a web app for very
simple applications that require minimal complexity such as a
displaying a customer/client list or a google map. For other apps
that require Word and Excel and Outlook or to perform most anything
complex such as importing or exporting, create a client app?
 
A

Albert D. Kallal

"Access Developer" wrote in message
Jet (then abbreviated as JET for Joint Engine Technology) came with Access
1.0, in Oct. 1992... and, if you agree that ACE is both the physical and
philosophical descendent of Jet, it's still around -- 'way more than 9
years.

I 100%+ agree with above. Changing a name does NOT change what something is.

I can have a round bowel made of glass, and you might call it a candy dish,
and I might call it a dog bowel.

At the end of the day, it 4 ounces of glass sculpted in a round circle 1
inch high by 3 inches in diameter.
It is what it is and the name does NOT change what that object is!

The new ACE engine is 100% based on the old code base and it the same code
with new features.

By all rights and by all reasoned reasoning, ACE is the newer version of JET
and a "name change" does not change WHAT that thing is or was!
(I don't count the years that ADO was so highly hyped, because it never
found a place in the hearts and minds of the Access community -- just one
more "wild hare" among many "tangents" of data access among the troops in
Redmond.

I agree.

In fact, I am much pointing out how time flies here! (really hard to
believe!)
With DAO having been returned as the "default" data model in Access 2003, it
been in effect as the previous "run"
(and to be fair, I give credit to the folks in Redmond backpedaling back to
DAO).

My point is I do believe that DAO as a default NOW has been in effect as
LONG as the previous time frame. The last time frame was 2.0 to 97.

The "new" timeframe is 2003 to 2010

So after Access 97, ADO became the default (2000, 2002), and that changed
back to DAO in 2003.

In effect, the "recent" span of DAO is just a long as the "previous" (Access
2.0 to Access 97).
Remember when they used to introduce a "data access method for all time to
come" with each new release of classic Visual Basic?)

I never adopted ADO, but in all fairness ADO had a very good run of at least
10 years in our marketplace,
and I would say that most VB6 developers when they adopted SQL server did
use ADO. ADO did in fact
serve what it was designed for. For those building non JET/ACE applications
I support their past choice
of ADO despite the technology now being depreciated.

In other words I think a 10 year long lifespan for some of these
technologies is quite good and I can give ADO credit where due.

When I look at the past previous littered landscape of products that we
don't see in the marketplace from "Knowledge Man", Data Ease, Paradox,
dBase, FoxPro, VB6 etc, most of these products were actually only around and
supported for about 10 years.

There are only a few exceptions of products going beyond 10 years. Access
certainly happens to be one of them. I not often pointed this out in public,
but a few years ago prior to office 2010, I was rather worried about the
transition from x32 to x64 code and this was going to be a GREAT excuse to
kill VBA.

Thankfully, we got the round of large investments and a new x64 bit version
of VBA.
Unlike FoxPro, VB6, and many other products, they will NOT cross this
bridge, but we ALREADY have an x64 version of ACE and x64 VBA in the bag.
This means we have a future with x64 operating systems. In the next few
years this issue will become more and more important as more more software
crosses this bridge.
Larry Linson
Microsoft Office Access MVP (re-awarded 4/1/2012)
Co-Author, Microsoft Access Small Business Solutions, Wiley 2010

Congrats, on you being re-awarded as MVP.

By the way, a public thank you for your continued support of comp.databases
MS access.
It only takes a few posters to make a significant difference here as to this
group and forum being something viable and useful for the Access community.
You certainly qualify as of the folks here that keeps the lights on, and
thus that keeps folks like me around also!

And note how I am having a GREAT and good enjoyable time in CDMA!
This includes some great discussions about new technologies and cloud
options that Access has.
I mean this thread is about table triggers - a cool new feature that has
some great uses.

I pretty much look at new features in Access as a real gift horse, and I
think the last set of enhancements and features has made this group
considerably less boring !

And I don't think 10 years ago I would've imagined me building forms in
Access that are running on my smart phone from the web as I'm currently
doing, and doing so for such low cost.
 
N

Neil

Access Developer said:
Ah, yes... "forever" didn't last long for that "access method of the
future, forever", did it?

Guess it depends on how you define "forever." (No, wait, no it doesn't!...
;-) )
 
N

Neil

Congrats, on you being re-awarded as MVP.

By the way, a public thank you for your continued support of
comp.databases MS access.
It only takes a few posters to make a significant difference here as to
this group and forum being something viable and useful for the Access
community.
You certainly qualify as of the folks here that keeps the lights on, and
thus that keeps folks like me around also!

Agreed. Congrats to Larry, and a big Thank You to both of you!!
And I don't think 10 years ago I would've imagined me building forms in
Access that are running on my smart phone from the web as I'm currently
doing, and doing so for such low cost.

Nor I.

Neil
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top