A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Running & Setting Up Queries
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

(Trans)action ID to group records



 
 
Thread Tools Display Modes
  #1  
Old December 15th, 2008, 10:50 AM posted to microsoft.public.access.queries
Onno[_2_]
external usenet poster
 
Posts: 8
Default (Trans)action ID to group records

Hi, I have a VB.NET app that writes 'usage logging' to an Access DB
via OleDb. There are applications all over the plant that log to the
same DB, so we can have a bit of insight in how the application is
being used. Some logged actions are a single entry ("user did this or
that"), others actions belong together ("user started action x" /
"user ended action x"). Not all start actions that should have a stop
action do so; user can abort, app can terminate, network can fail,
etc.

Right now, I am having a bit of trouble finding out which start/end
actions belong together. I do this on other parameters (IP address,
user name, etc) that I also log. It works, but is cumbersome.

A better way would be to give a 'transaction' ID to each action
logged, and let the app remember this and use the same transaction ID
for the end call. I could use an empty table with an auto-increment
field to generate unique transaction ID's.

Is this the preferred way? Does Access or VB.NET offer some methods
for this or do I have to implement it myself?

Thanks in advance,
Onno
  #2  
Old December 15th, 2008, 10:58 AM posted to microsoft.public.access.queries
Stefan Hoffmann
external usenet poster
 
Posts: 991
Default (Trans)action ID to group records

hi,

Onno wrote:
A better way would be to give a 'transaction' ID to each action
logged, and let the app remember this and use the same transaction ID
for the end call. I could use an empty table with an auto-increment
field to generate unique transaction ID's.

Use an GUID to identify your actions, field type replication id or
string, let the application create it per action/workflow.


mfG
-- stefan --

  #3  
Old December 15th, 2008, 11:25 AM posted to microsoft.public.access.queries
Onno[_2_]
external usenet poster
 
Posts: 8
Default (Trans)action ID to group records

On 15 dec, 11:58, Stefan Hoffmann wrote:
hi,

Onno wrote:
A better way would be to give a 'transaction' ID to each action
logged, and let the app remember this and use the same transaction ID
for the end call. I could use an empty table with an auto-increment
field to generate unique transaction ID's.


Use an GUID to identify your actions, field type replication id or
string, let the application create it per action/workflow.

mfG
-- stefan --


Thanks for your answer. I am not sure as why this would be better than
using a table in Access to create ID's? (2 GUID's could be the same,
although very little chance).

I would use something like Guid.NewGui() to create it and store it in
text field of 36 characters, right?

Thanks again.
  #4  
Old December 15th, 2008, 11:38 AM posted to microsoft.public.access.queries
Stefan Hoffmann
external usenet poster
 
Posts: 991
Default (Trans)action ID to group records

hi,

Onno wrote:
Thanks for your answer. I am not sure as why this would be better than
using a table in Access to create ID's? (2 GUID's could be the same,
although very little chance).

I would rely onto the uniqueness of a GUID. I think it's better, because
otherwise you have think about how to persist actions/workflow
definitions in your database. I don't think that is what you want. Also
reduces the local GUID creation network traffic. Minor points, but worth
the consideration.

I would use something like Guid.NewGui() to create it and store it in
text field of 36 characters, right?

Yes.


mfG
-- stefan --
  #5  
Old December 15th, 2008, 11:55 AM posted to microsoft.public.access.queries
Onno[_2_]
external usenet poster
 
Posts: 8
Default (Trans)action ID to group records

On 15 dec, 12:38, Stefan Hoffmann wrote:
hi,

Onno wrote:
Thanks for your answer. I am not sure as why this would be better than
using a table in Access to create ID's? (2 GUID's could be the same,
although very little chance).


I would rely onto the uniqueness of a GUID. I think it's better, because
otherwise you have think about how to persist actions/workflow
definitions in your database. I don't think that is what you want. Also
reduces the local GUID creation network traffic. Minor points, but worth
* the consideration.

I would use something like Guid.NewGui() to create it and store it in
text field of 36 characters, right?


Yes.

mfG
-- stefan --


Ok, I will try that. Thanks!
Onno
 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 03:42 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.